]> git.baikalelectronics.ru Git - kernel.git/commit
net: Implement ->sock_is_readable() for UDP and AF_UNIX
authorCong Wang <cong.wang@bytedance.com>
Fri, 8 Oct 2021 20:33:05 +0000 (13:33 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 26 Oct 2021 19:29:33 +0000 (12:29 -0700)
commitdd511c5a022c9346895ae72972d7824bada52a26
tree455eada3764f5a609fca659442e3cc5a43e4d7dd
parent59242f5b37970e54778f7156b380d4fdeddf3142
net: Implement ->sock_is_readable() for UDP and AF_UNIX

Yucong noticed we can't poll() sockets in sockmap even
when they are the destination sockets of redirections.
This is because we never poll any psock queues in ->poll(),
except for TCP. With ->sock_is_readable() now we can
overwrite >sock_is_readable(), invoke and implement it for
both UDP and AF_UNIX sockets.

Reported-by: Yucong Sun <sunyucong@gmail.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211008203306.37525-4-xiyou.wangcong@gmail.com
net/ipv4/udp.c
net/ipv4/udp_bpf.c
net/unix/af_unix.c
net/unix/unix_bpf.c