Re: [PATCH bpf-next 1/2] bpf, sockmap: Fix udp_bpf_recvmsg() spinning on backlog-only ingress
From: Alexei Starovoitov
Date: Wed Sep 30 2026 - 05:02:56 EST
On Tue, Sep 29, 2026 at 04:34 PM chenyuan_fl@xxxxxxx <chenyuan_fl@xxxxxxx> wrote:
> @@ -91,7 +91,7 @@ static int udp_bpf_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
> timeo = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
> data = udp_msg_wait_data(sk, psock, timeo);
> if (data) {
> - if (psock_has_data(psock))
> + if (!sk_psock_queue_empty(psock))
> goto msg_bytes_ready;
>
> release_sock(sk);
sashiko is right. This replaces a spin with a hang.
pw-bot: cr