On Mon, Nov 18, 2024 at 10:03:41PM +0100, Michal Luczaj wrote:
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 <[email protected]>
---
net/vmw_vsock/af_vsock.c | 3 +++
1 file changed, 3 insertions(+)

Yep, in vsock_bpf.c we set `prot->sock_is_readable = sk_msg_is_readable`,
so it LGTM!

Reviewed-by: Stefano Garzarella <[email protected]>


diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 
dfd29160fe11c4675f872c1ee123d65b2da0dae6..919da8edd03c838cbcdbf1618425da6c5ec2df1a
 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

--
2.46.2



Reply via email to