Thread (5 messages) 5 messages, 3 authors, 15d ago

Re: [PATCH bpf-next 1/2] bpf, sockmap: Fix udp_bpf_recvmsg() spinning on backlog-only ingress

flat view

From: Alexei Starovoitov <hidden>
Date: 2026-09-30 09:02:01
Also in: bpf, lkml

On Tue, Sep 29, 2026 at 04:34 PM chenyuan_fl@163.com [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help