This is a note to let you know that I've just added the patch titled bpf, vsock: Fix poll() missing a queue to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: bpf-vsock-fix-poll-missing-a-queue.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 3c9d0f5c5799ccff5a4b2502e797ccee3c9960d8 Author: Michal Luczaj <mhal@xxxxxxx> Date: Mon Nov 18 22:03:41 2024 +0100 bpf, vsock: Fix poll() missing a queue [ Upstream commit 9f0fc98145218ff8f50d8cfa3b393785056c53e1 ] When a verdict program simply passes a packet without redirection, sk_msg is enqueued on sk_psock::ingress_msg. Add a missing check to poll(). Fixes: 634f1a7110b4 ("vsock: support sockmap") Signed-off-by: Michal Luczaj <mhal@xxxxxxx> Reviewed-by: Stefano Garzarella <sgarzare@xxxxxxxxxx> Reviewed-by: Luigi Leonardi <leonardi@xxxxxxxxxx> Link: https://lore.kernel.org/r/20241118-vsock-bpf-poll-close-v1-1-f1b9669cacdc@xxxxxxx Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> Acked-by: John Fastabend <john.fastabend@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index dfd29160fe11c..919da8edd03c8 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1054,6 +1054,9 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock, mask |= EPOLLRDHUP; } + if (sk_is_readable(sk)) + mask |= EPOLLIN | EPOLLRDNORM; + if (sock->type == SOCK_DGRAM) { /* For datagram sockets we can read if there is something in * the queue and write as long as the socket isn't shutdown for