Commit a4174ea
Paolo Abeni
tcp: fix __tcp_close() to only send RST when required
JIRA: https://issues.redhat.com/browse/RHEL-115580
Upstream commit:
commit 5f92385
Author: Eric Dumazet <edumazet@google.com>
Date: Wed Sep 3 08:47:18 2025 +0000
tcp: fix __tcp_close() to only send RST when required
If the receive queue contains payload that was already
received, __tcp_close() can send an unexpected RST.
Refine the code to take tp->copied_seq into account,
as we already do in tcp recvmsg().
Fixes: 1da177e ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20250903084720.1168904-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent e04cafd commit a4174ea
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3044 | 3044 | | |
3045 | 3045 | | |
3046 | 3046 | | |
| 3047 | + | |
3047 | 3048 | | |
3048 | | - | |
3049 | 3049 | | |
3050 | 3050 | | |
3051 | 3051 | | |
| |||
3064 | 3064 | | |
3065 | 3065 | | |
3066 | 3066 | | |
3067 | | - | |
| 3067 | + | |
3068 | 3068 | | |
3069 | 3069 | | |
3070 | | - | |
3071 | | - | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
3072 | 3073 | | |
3073 | 3074 | | |
3074 | 3075 | | |
| |||
0 commit comments