Files
linux/net/ipv4
Eric Dumazet 44aa1e461c tcp: fix races in tcp_v[46]_err()
[ Upstream commit fde6f897f2 ]

These functions have races when they:

1) Write sk->sk_err
2) call sk_error_report(sk)
3) call tcp_done(sk)

As described in prior patches in this series:

An smp_wmb() is missing.
We should call tcp_done() before sk_error_report(sk)
to have consistent tcp_poll() results on SMP hosts.

Use tcp_done_with_error() where we centralized the
correct sequence.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Link: https://lore.kernel.org/r/20240528125253.1966136-5-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:53:37 +02:00
..
2023-05-31 13:06:57 +02:00
2024-03-01 13:35:08 +01:00
2024-06-16 13:47:44 +02:00
2022-09-20 10:21:49 -07:00
2024-08-03 08:53:37 +02:00
2022-12-20 03:13:45 +01:00
2024-08-03 08:53:37 +02:00
2024-08-03 08:53:37 +02:00
2022-11-16 09:43:35 +00:00
2023-11-20 11:58:56 +01:00