Commit 8c735bbe authored by Eric Dumazet's avatar Eric Dumazet Committed by Youngmin Nam
Browse files

BACKPORT: tcp: fix races in tcp_abort()



tcp_abort() has the same issue than the one fixed in the prior patch
in tcp_write_err().

In order to get consistent results from tcp_poll(), we must call
sk_error_report() after tcp_done().

We can use tcp_done_with_error() to centralize this logic.

Fixes: c1e64e29 ("net: diag: Support destroying TCP sockets.")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Link: https://lore.kernel.org/r/20240528125253.1966136-4-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20250314092446.852230-1-youngmin.nam@samsung.com


Bug: 381788344
Change-Id: I9d5ae8a9874e5b22e39d11695696cb2b850db8c8
(cherry picked from commit 5ce4645c)
[youngmin: Resolved minor conflict in net/ipv4/tcp.c ]
Signed-off-by: default avatarYoungmin Nam <youngmin.nam@samsung.com>
parent 723d107d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment