From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Youngmin Nam <youngmin.nam@samsung.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH v2 stable 5.15 2/2] tcp: fix forever orphan socket caused by tcp_abort
Date: Mon, 17 Mar 2025 12:40:08 -0400 [thread overview]
Message-ID: <20250317092209-2217d4aa9ea3ad7e@stable.kernel.org> (raw)
In-Reply-To: <20250317050950.2351143-2-youngmin.nam@samsung.com>
[ 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 Nam<youngmin.nam@samsung.com>
Commit author: Xueming Feng<kuro@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 |
next prev parent reply other threads:[~2025-03-17 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250317050548epcas2p158c1bfcef5059e51afeab70680da5e5d@epcas2p1.samsung.com>
2025-03-17 5:09 ` [PATCH v2 stable 5.15 1/2] tcp: fix races in tcp_abort() Youngmin Nam
2025-03-17 5:09 ` [PATCH v2 stable 5.15 2/2] tcp: fix forever orphan socket caused by tcp_abort Youngmin Nam
2025-03-17 16:40 ` Sasha Levin [this message]
2025-03-17 16:40 ` [PATCH v2 stable 5.15 1/2] tcp: fix races in tcp_abort() Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250317092209-2217d4aa9ea3ad7e@stable.kernel.org \
--to=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=youngmin.nam@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.