From: <gregkh@linuxfoundation.org>
To: EF8A45D0-768A-4CD5-9A8A-0FA6E610ABF7@winter.cafe,gregkh@linuxfoundation.org,kuniyu@amazon.com,regressions@lists.linux.dev,w@1wt.eu,winter@winter.cafe
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "tcp: Fix listen() regression in 5.15.88." has been added to the 5.15-stable tree
Date: Fri, 17 Feb 2023 15:25:18 +0100 [thread overview]
Message-ID: <1676643918250202@kroah.com> (raw)
In-Reply-To: <20230213205835.56151-1-kuniyu@amazon.com>
This is a note to let you know that I've just added the patch titled
tcp: Fix listen() regression in 5.15.88.
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tcp-fix-listen-regression-in-5.15.88.patch
and it can be found in the queue-5.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From kuniyu@amazon.com Fri Feb 17 15:21:48 2023
From: Kuniyuki Iwashima <kuniyu@amazon.com>
Date: Mon, 13 Feb 2023 20:45:48 +0000
Subject: tcp: Fix listen() regression in 5.15.88.
To: <gregkh@linuxfoundation.org>
Cc: <kuniyu@amazon.com>, <netdev@vger.kernel.org>, <regressions@lists.linux.dev>, <stable@vger.kernel.org>, <w@1wt.eu>, <winter@winter.cafe>
Message-ID: <20230213205835.56151-1-kuniyu@amazon.com>
From: Kuniyuki Iwashima <kuniyu@amazon.com>
When we backport dadd0dcaa67d ("net/ulp: prevent ULP without clone op from
entering the LISTEN status"), we have accidentally backported a part of
7a7160edf1bf ("net: Return errno in sk->sk_prot->get_port().") and removed
err = -EADDRINUSE in inet_csk_listen_start().
Thus, listen() no longer returns -EADDRINUSE even if ->get_port() failed
as reported in [0].
We set -EADDRINUSE to err just before ->get_port() to fix the regression.
[0]: https://lore.kernel.org/stable/EF8A45D0-768A-4CD5-9A8A-0FA6E610ABF7@winter.cafe/
Reported-by: Winter <winter@winter.cafe>
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/inet_connection_sock.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -1070,6 +1070,7 @@ int inet_csk_listen_start(struct sock *s
* It is OK, because this socket enters to hash table only
* after validation is complete.
*/
+ err = -EADDRINUSE;
inet_sk_state_store(sk, TCP_LISTEN);
if (!sk->sk_prot->get_port(sk, inet->inet_num)) {
inet->inet_sport = htons(inet->inet_num);
Patches currently in stable-queue which might be from kuniyu@amazon.com are
queue-5.15/net-rose-fix-to-not-accept-on-connected-socket.patch
queue-5.15/tcp-fix-listen-regression-in-5.15.88.patch
next prev parent reply other threads:[~2023-02-17 14:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 3:38 [REGRESSION] 5.15.88 and onwards no longer return EADDRINUSE from bind Winter
2023-02-13 4:27 ` Willy Tarreau
2023-02-13 7:25 ` Greg KH
2023-02-13 7:52 ` Willy Tarreau
2023-02-13 16:44 ` Kuniyuki Iwashima
2023-02-13 17:48 ` Greg KH
2023-02-13 20:58 ` Kuniyuki Iwashima
2023-02-17 14:22 ` Greg KH
2023-02-17 14:25 ` gregkh [this message]
2023-02-28 11:11 ` Linux regression tracking #update (Thorsten Leemhuis)
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=1676643918250202@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=EF8A45D0-768A-4CD5-9A8A-0FA6E610ABF7@winter.cafe \
--cc=kuniyu@amazon.com \
--cc=regressions@lists.linux.dev \
--cc=stable-commits@vger.kernel.org \
--cc=w@1wt.eu \
--cc=winter@winter.cafe \
/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.