From: Luigi Leonardi <leonardi@redhat.com>
To: mhal@rbox.co
Cc: andrii@kernel.org, ast@kernel.org, bobby.eshleman@bytedance.com,
bpf@vger.kernel.org, daniel@iogearbox.net, davem@davemloft.net,
eddyz87@gmail.com, edumazet@google.com, haoluo@google.com,
horms@kernel.org, john.fastabend@gmail.com, jolsa@kernel.org,
kpsingh@kernel.org, kuba@kernel.org,
linux-kselftest@vger.kernel.org, martin.lau@linux.dev,
mst@redhat.com, mykolal@fb.com, netdev@vger.kernel.org,
pabeni@redhat.com, sdf@fomichev.me, sgarzare@redhat.com,
shuah@kernel.org, song@kernel.org, yonghong.song@linux.dev,
Luigi Leonardi <leonardi@redhat.com>
Subject: Re: [PATCH bpf 1/4] bpf, vsock: Fix poll() missing a queue
Date: Fri, 22 Nov 2024 18:26:29 +0100 [thread overview]
Message-ID: <20241122172629.62588-1-leonardi@redhat.com> (raw)
In-Reply-To: <20241118-vsock-bpf-poll-close-v1-1-f1b9669cacdc@rbox.co>
>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@rbox.co>
>---
> net/vmw_vsock/af_vsock.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>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
LGTM, thanks!
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
next prev parent reply other threads:[~2024-11-22 17:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 21:03 [PATCH bpf 0/4] bpf, vsock: Fix poll() and close() Michal Luczaj
2024-11-18 21:03 ` [PATCH bpf 1/4] bpf, vsock: Fix poll() missing a queue Michal Luczaj
2024-11-21 9:20 ` Stefano Garzarella
2024-11-22 17:26 ` Luigi Leonardi [this message]
2024-11-18 21:03 ` [PATCH bpf 2/4] selftest/bpf: Add test for af_vsock poll() Michal Luczaj
2024-11-21 9:21 ` Stefano Garzarella
2024-11-18 21:03 ` [PATCH bpf 3/4] bpf, vsock: Invoke proto::close on close() Michal Luczaj
2024-11-21 9:22 ` Stefano Garzarella
2024-11-21 19:54 ` Michal Luczaj
2024-11-22 8:13 ` Stefano Garzarella
2024-11-22 16:20 ` Luigi Leonardi
2024-11-18 21:03 ` [PATCH bpf 4/4] selftest/bpf: Add test for vsock removal from sockmap " Michal Luczaj
2024-11-21 9:22 ` Stefano Garzarella
2024-11-21 6:48 ` [PATCH bpf 0/4] bpf, vsock: Fix poll() and close() John Fastabend
2024-11-21 8:08 ` Stefano Garzarella
2024-11-21 23:34 ` John Fastabend
2024-11-22 8:16 ` Stefano Garzarella
2024-11-25 22:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241122172629.62588-1-leonardi@redhat.com \
--to=leonardi@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bobby.eshleman@bytedance.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mhal@rbox.co \
--cc=mst@redhat.com \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=sgarzare@redhat.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).