Skip to content

Commit 9f0fc98

Browse files
mmhalAlexei Starovoitov
authored andcommitted
bpf, vsock: Fix poll() missing a queue
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: 634f1a7 ("vsock: support sockmap") Signed-off-by: Michal Luczaj <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Reviewed-by: Luigi Leonardi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: John Fastabend <[email protected]>
1 parent 8618f5f commit 9f0fc98

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/vmw_vsock/af_vsock.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,9 @@ static __poll_t vsock_poll(struct file *file, struct socket *sock,
10541054
mask |= EPOLLRDHUP;
10551055
}
10561056

1057+
if (sk_is_readable(sk))
1058+
mask |= EPOLLIN | EPOLLRDNORM;
1059+
10571060
if (sock->type == SOCK_DGRAM) {
10581061
/* For datagram sockets we can read if there is something in
10591062
* the queue and write as long as the socket isn't shutdown for

0 commit comments

Comments
 (0)