netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Regression] 6.0.16-6.0.18 kernel no longer return EADDRINUSE from bind
@ 2023-01-11 15:52 Paul Holzinger
  2023-01-12 11:40 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Holzinger @ 2023-01-11 15:52 UTC (permalink / raw)
  To: stable; +Cc: regressions, netdev

Hi all,

Since updating to 6.0.16 the bind() system call no longer fails with
EADDRINUSE when the address is already in use.
Instead bind() returns 1 in such a case, which is not a valid return
value for this system call.

It works with the 6.0.15 kernel and earlier, 6.1.4 and 6.2-rc3 also
seem to work.

Fedora bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2159066

To reproduce you can just run `ncat -l 5000` two times, the second one
should fail. However it just uses a random port instead.

As far as I can tell this problem is caused by
https://lore.kernel.org/stable/20221228144337.512799851@linuxfoundation.org/
which did not backport commit 7a7160edf1bf properly.
The line `int ret = -EADDRINUSE, port = snum, l3mdev;` is missing in
net/ipv4/inet_connection_sock.c.
This is the working 6.1 patch:
https://lore.kernel.org/all/20221228144339.969733443@linuxfoundation.org/

Best regards,
Paul


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Regression] 6.0.16-6.0.18 kernel no longer return EADDRINUSE from bind
  2023-01-11 15:52 [Regression] 6.0.16-6.0.18 kernel no longer return EADDRINUSE from bind Paul Holzinger
@ 2023-01-12 11:40 ` Greg KH
  2023-01-12 13:27   ` Paul Holzinger
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2023-01-12 11:40 UTC (permalink / raw)
  To: Paul Holzinger; +Cc: stable, regressions, netdev

On Wed, Jan 11, 2023 at 04:52:21PM +0100, Paul Holzinger wrote:
> Hi all,
> 
> Since updating to 6.0.16 the bind() system call no longer fails with
> EADDRINUSE when the address is already in use.
> Instead bind() returns 1 in such a case, which is not a valid return
> value for this system call.
> 
> It works with the 6.0.15 kernel and earlier, 6.1.4 and 6.2-rc3 also
> seem to work.
> 
> Fedora bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2159066
> 
> To reproduce you can just run `ncat -l 5000` two times, the second one
> should fail. However it just uses a random port instead.
> 
> As far as I can tell this problem is caused by
> https://lore.kernel.org/stable/20221228144337.512799851@linuxfoundation.org/
> which did not backport commit 7a7160edf1bf properly.
> The line `int ret = -EADDRINUSE, port = snum, l3mdev;` is missing in
> net/ipv4/inet_connection_sock.c.
> This is the working 6.1 patch:
> https://lore.kernel.org/all/20221228144339.969733443@linuxfoundation.org/

As 6.0.y is now end-of-life, is there anything keeping you on that
kernel tree?  If you send a fix-up patch for this, I'll gladly apply it
and push out one more 6.0 release with it.

thanks,
g
reg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Regression] 6.0.16-6.0.18 kernel no longer return EADDRINUSE from bind
  2023-01-12 11:40 ` Greg KH
@ 2023-01-12 13:27   ` Paul Holzinger
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Holzinger @ 2023-01-12 13:27 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, regressions, netdev

Hi Greg,

Nothing particular is keeping me on this kernel, it is currently
shipped in fedora.
I assume fedora will update to 6.1 as usual so updating is not a problem for me.

I wasn't sure how long the 6.0 series gets updates so I decided to
report it here. If it is EOL that is fine for me.

Thanks,
Paul


On Thu, Jan 12, 2023 at 12:50 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Wed, Jan 11, 2023 at 04:52:21PM +0100, Paul Holzinger wrote:
> > Hi all,
> >
> > Since updating to 6.0.16 the bind() system call no longer fails with
> > EADDRINUSE when the address is already in use.
> > Instead bind() returns 1 in such a case, which is not a valid return
> > value for this system call.
> >
> > It works with the 6.0.15 kernel and earlier, 6.1.4 and 6.2-rc3 also
> > seem to work.
> >
> > Fedora bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2159066
> >
> > To reproduce you can just run `ncat -l 5000` two times, the second one
> > should fail. However it just uses a random port instead.
> >
> > As far as I can tell this problem is caused by
> > https://lore.kernel.org/stable/20221228144337.512799851@linuxfoundation.org/
> > which did not backport commit 7a7160edf1bf properly.
> > The line `int ret = -EADDRINUSE, port = snum, l3mdev;` is missing in
> > net/ipv4/inet_connection_sock.c.
> > This is the working 6.1 patch:
> > https://lore.kernel.org/all/20221228144339.969733443@linuxfoundation.org/
>
> As 6.0.y is now end-of-life, is there anything keeping you on that
> kernel tree?  If you send a fix-up patch for this, I'll gladly apply it
> and push out one more 6.0 release with it.
>
> thanks,
> g
> reg k-h
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-12 13:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 15:52 [Regression] 6.0.16-6.0.18 kernel no longer return EADDRINUSE from bind Paul Holzinger
2023-01-12 11:40 ` Greg KH
2023-01-12 13:27   ` Paul Holzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).