linux-stable/include
Eric Dumazet 6646145be9 udp: fix busy polling
[ Upstream commit a54d51fb2d ]

Generic sk_busy_loop_end() only looks at sk->sk_receive_queue
for presence of packets.

Problem is that for UDP sockets after blamed commit, some packets
could be present in another queue: udp_sk(sk)->reader_queue

In some cases, a busy poller could spin until timeout expiration,
even if some packets are available in udp_sk(sk)->reader_queue.

v3: - make sk_busy_loop_end() nicer (Willem)

v2: - add a READ_ONCE(sk->sk_family) in sk_is_inet() to avoid KCSAN splats.
    - add a sk_is_inet() check in sk_is_udp() (Willem feedback)
    - add a sk_is_inet() check in sk_is_tcp().

Fixes: 2276f58ac5 ("udp: use a separate rx queue for packet reception")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-31 16:17:04 -08:00
..
acpi
asm-generic asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 17:00:24 +01:00
clocksource
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 15:27:21 -08:00
drm drm/bridge: Fix typo in post_disable() description 2024-01-25 15:27:32 -08:00
dt-bindings dt-bindings: clock: Update the videocc resets for sm8150 2024-01-25 15:27:36 -08:00
keys
kunit
kvm
linux udp: fix busy polling 2024-01-31 16:17:04 -08:00
math-emu
media
memory
misc
net udp: fix busy polling 2024-01-31 16:17:04 -08:00
pcmcia
ras
rdma RDMA/core: Fix umem iterator when PAGE_SIZE is greater then HCA pgsz 2023-12-13 18:39:15 +01:00
rv
scsi
soc
sound
target
trace 9p: prevent read overrun in protocol dump tracepoint 2024-01-01 12:39:05 +00:00
uapi bpf: Add crosstask check to __bpf_get_stack 2024-01-25 15:27:24 -08:00
ufs
vdso
video
xen