linux/net/unix
Kuniyuki Iwashima 6e5ee08eb5 af_unix: Return immediately when manage_oob() returns NULL for 0-length buffer.
Fahad Alharbi reported that recv(0, MSG_PEEK) triggers busy-wait
in unix_stream_read_generic() if recv() is blocking and the last
skb in the queue is MSG_OOB skb.

In such a situation, TCP returns 0 immediately regardless of
blocking or non-blocking.

Let's follow the behaviour.

Fixes: 314001f0bf ("af_unix: Add OOB support")
Reported-by: Fahad Alharbi <fahad@codepure.com>
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260902202202.892676-3-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-07 16:58:42 -07:00
..
af_unix.c af_unix: Return immediately when manage_oob() returns NULL for 0-length buffer. 2026-09-07 16:58:42 -07:00
af_unix.h af_unix: Give up GC if MSG_PEEK intervened. 2026-03-12 13:37:18 -07:00
diag.c vfs-7.1-rc1.kino 2026-04-13 12:19:01 -07:00
garbage.c af_unix: Unlink scc_entry in unix_del_edge(). 2026-08-06 11:52:48 -07:00
Kconfig af_unix: Add a prompt to CONFIG_AF_UNIX_OOB 2024-12-19 19:16:15 -08:00
Makefile af_unix: Remove CONFIG_UNIX_SCM. 2024-01-31 16:41:16 -08:00
sysctl_net_unix.c net: Const qualify network templated ctl_tables Arrays 2026-08-13 13:12:24 +02:00
unix_bpf.c bpf, sockmap: Fix af_unix null-ptr-deref in proto update 2026-04-15 17:22:58 -07:00