[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: bac76cf89816bff06c4ec2f3df97dc34e150a1c4
WARNING: Author mismatch between patch and upstream commit: Backport author: Youngmin Namyoungmin.nam@samsung.com Commit author: Xueming Fengkuro@kuroa.me
Status in newer kernel trees: 6.13.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (different SHA1: 93c4706e7dd0) 6.1.y | Present (different SHA1: 8b20f4507d48)
Note: The patch differs from the upstream commit: --- 1: bac76cf89816b ! 1: 447939338b010 tcp: fix forever orphan socket caused by tcp_abort @@ Metadata ## Commit message ## tcp: fix forever orphan socket caused by tcp_abort
+ commit bac76cf89816bff06c4ec2f3df97dc34e150a1c4 upstream. + We have some problem closing zero-window fin-wait-1 tcp sockets in our environment. This patch come from the investigation.
@@ Commit message Reviewed-by: Eric Dumazet edumazet@google.com Link: https://patch.msgid.link/20240826102327.1461482-1-kuro@kuroa.me Signed-off-by: Jakub Kicinski kuba@kernel.org + Cc: stable@vger.kernel.org + Link: https://lore.kernel.org/lkml/Z9OZS%2Fhc+v5og6%2FU@perf/ + [youngmin: Resolved minor conflict in net/ipv4/tcp.c] + Signed-off-by: Youngmin Nam youngmin.nam@samsung.com
## net/ipv4/tcp.c ## @@ net/ipv4/tcp.c: int tcp_abort(struct sock *sk, int err) - /* Don't race with userspace socket closes such as tcp_close. */ - lock_sock(sk); + /* Don't race with userspace socket closes such as tcp_close. */ + lock_sock(sk);
+ /* Avoid closing the same socket twice. */ + if (sk->sk_state == TCP_CLOSE) { -+ if (!has_current_bpf_ctx()) -+ release_sock(sk); ++ release_sock(sk); + return -ENOENT; + } + @@ net/ipv4/tcp.c: int tcp_abort(struct sock *sk, int err)
- if (!sock_flag(sk, SOCK_DEAD)) { - if (tcp_need_reset(sk->sk_state)) -- tcp_send_active_reset(sk, GFP_ATOMIC, -- SK_RST_REASON_NOT_SPECIFIED); +- tcp_send_active_reset(sk, GFP_ATOMIC); - tcp_done_with_error(sk, err); - } + if (tcp_need_reset(sk->sk_state)) -+ tcp_send_active_reset(sk, GFP_ATOMIC, -+ SK_RST_REASON_NOT_SPECIFIED); ++ tcp_send_active_reset(sk, GFP_ATOMIC); + tcp_done_with_error(sk, err);
bh_unlock_sock(sk); local_bh_enable(); - tcp_write_queue_purge(sk); - if (!has_current_bpf_ctx()) - release_sock(sk); + release_sock(sk); return 0; + } ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.15.y | Success | Success |