Eric Dumazet
6646145be9
udp: fix busy polling
...
[ Upstream commit a54d51fb2dfb846aedf3751af501e9688db447f5 ]
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
..
2024-01-25 15:27:47 -08:00
2023-11-20 11:52:08 +01:00
2024-01-01 12:38:55 +00:00
2023-12-08 08:51:19 +01:00
2023-10-10 22:00:43 +02:00
2023-10-10 22:00:40 +02:00
2023-09-23 11:11:00 +02:00
2024-01-05 15:18:40 +01:00
2023-11-28 17:07:04 +00:00
2023-12-20 17:00:14 +01:00
2023-09-23 11:11:00 +02:00
2023-09-13 09:43:03 +02:00
2024-01-31 16:17:00 -08:00
2024-01-25 15:27:42 -08:00
2024-01-25 15:27:30 -08:00
2024-01-10 17:10:29 +01:00
2024-01-25 15:27:26 -08:00
2023-10-06 14:57:04 +02:00
2023-09-23 11:11:08 +02:00
2024-01-25 15:27:37 -08:00
2023-08-30 16:11:12 +02:00
2023-08-16 18:27:25 +02:00
2023-12-13 18:39:03 +01:00
2023-08-30 16:11:10 +02:00
2023-12-20 17:00:20 +01:00
2024-01-01 12:39:08 +00:00
2024-01-01 12:39:05 +00:00
2023-09-23 11:11:08 +02:00
2023-12-08 08:51:15 +01:00
2023-11-28 17:07:18 +00:00
2024-01-05 15:18:38 +01:00
2024-01-10 17:10:30 +01:00
2023-10-25 12:03:12 +02:00
2024-01-10 17:10:27 +01:00
2023-11-28 17:06:54 +00:00
2024-01-10 17:10:33 +01:00
2023-12-03 07:32:07 +01:00
2024-01-25 15:27:22 -08:00
2023-12-13 18:39:03 +01:00
2023-12-13 18:39:20 +01:00
2023-11-20 11:52:04 +01:00
2023-11-20 11:52:16 +01:00
2024-01-20 11:50:03 +01:00
2023-09-13 09:43:03 +02:00
2023-10-06 14:56:41 +02:00
2023-12-20 17:00:16 +01:00
2023-09-23 11:11:09 +02:00
2023-10-06 14:57:03 +02:00
2023-12-13 18:39:17 +01:00
2023-08-23 17:52:20 +02:00
2023-09-13 09:42:46 +02:00
2023-10-10 22:00:37 +02:00
2023-12-08 08:51:20 +01:00
2024-01-20 11:50:06 +01:00
2023-10-25 12:03:16 +02:00
2024-01-01 12:38:52 +00:00
2023-09-13 09:42:53 +02:00
2024-01-01 12:38:58 +00:00
2023-12-13 18:39:17 +01:00
2023-10-19 23:08:50 +02:00
2024-01-31 16:17:00 -08:00
2024-01-31 16:17:01 -08:00
2023-10-19 23:08:56 +02:00
2023-10-06 14:57:03 +02:00
2023-09-19 12:28:02 +02:00
2023-12-20 17:00:26 +01:00
2023-10-10 22:00:35 +02:00
2024-01-31 16:17:02 -08:00
2024-01-05 15:18:40 +01:00
2023-09-02 09:16:18 +02:00
2024-01-05 15:18:29 +01:00
2024-01-10 17:10:27 +01:00
2023-11-20 11:51:55 +01:00
2024-01-25 15:27:51 -08:00
2023-10-06 14:56:31 +02:00
2023-10-15 18:32:41 +02:00
2023-09-13 09:42:48 +02:00
2023-09-13 09:42:22 +02:00
2023-11-20 11:51:50 +01:00
2024-01-25 15:27:20 -08:00
2024-01-10 17:10:32 +01:00
2023-11-08 14:11:03 +01:00
2023-09-13 09:42:46 +02:00
2023-10-25 12:03:15 +02:00
2023-11-08 14:11:02 +01:00
2023-11-28 17:07:03 +00:00
2024-01-05 15:18:40 +01:00
2023-07-27 08:50:38 +02:00
2023-07-27 08:50:38 +02:00
2023-11-28 17:07:03 +00:00
2023-10-19 23:08:50 +02:00
2023-10-19 23:08:50 +02:00
2023-08-30 16:11:12 +02:00
2024-01-25 15:27:26 -08:00
2023-10-06 14:57:03 +02:00
2023-12-13 18:39:17 +01:00
2024-01-31 16:17:02 -08:00
2023-08-30 16:11:11 +02:00
2024-01-31 16:17:00 -08:00
2023-10-06 14:56:41 +02:00
2024-01-25 15:27:51 -08:00
2024-01-31 16:17:04 -08:00
2024-01-10 17:10:27 +01:00
2024-01-10 17:10:27 +01:00
2023-12-13 18:39:08 +01:00
2023-11-28 17:06:57 +00:00
2023-11-28 17:07:08 +00:00
2023-09-19 12:27:59 +02:00
2023-07-27 08:50:49 +02:00
2023-08-16 18:27:20 +02:00
2023-11-28 17:07:23 +00:00
2024-01-10 17:10:28 +01:00
2023-11-20 11:52:04 +01:00
2023-08-23 17:52:35 +02:00
2023-11-20 11:52:17 +01:00
2023-11-28 17:06:55 +00:00