* Re: Asterisk deadlocks since Kernel 4.1 [not found] ` <5664A102.2030602@profihost.ag> @ 2015-12-07 1:20 ` Herbert Xu 2015-12-07 6:58 ` Stefan Priebe - Profihost AG 0 siblings, 1 reply; 6+ messages in thread From: Herbert Xu @ 2015-12-07 1:20 UTC (permalink / raw) To: Stefan Priebe Cc: Hannes Frederic Sowa, Florian Weimer, Thomas Gleixner, netdev, linux-fsdevel, linux-kernel, jannik Winkel, Marco Schinkel, David S. Miller, stable On Sun, Dec 06, 2015 at 09:56:34PM +0100, Stefan Priebe wrote: > Hi Herbert, > > i think i found the issue in 4.1 with netlink. Somebody made a > mistake while backporting or cherry-picking your patch "netlink: Fix > autobind race condition that leads to zero port ID" to 4.1. > > It misses a goto in 4.1. > > This goto is missing in 4.1: > > diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c > index 4017e12..f15c001 100644 > --- a/net/netlink/af_netlink.c > +++ b/net/netlink/af_netlink.c > @@ -1132,7 +1132,6 @@ static int netlink_insert(struct sock *sk, u32 portid) > if (err == -EEXIST) > err = -EADDRINUSE; > sock_put(sk); > - goto err; > } > > /* We need to ensure that the socket is hashed and visible. */ > > Can you please confirm, that this is not correct and might cause > those issues. Well spotted! Yes this would be a fatal error and can cause the problems you guys are seeing. Thanks, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Asterisk deadlocks since Kernel 4.1 2015-12-07 1:20 ` Asterisk deadlocks since Kernel 4.1 Herbert Xu @ 2015-12-07 6:58 ` Stefan Priebe - Profihost AG 2015-12-08 6:13 ` netlink: Add missing goto statement to netlink_insert Herbert Xu 0 siblings, 1 reply; 6+ messages in thread From: Stefan Priebe - Profihost AG @ 2015-12-07 6:58 UTC (permalink / raw) To: Herbert Xu Cc: Hannes Frederic Sowa, Florian Weimer, Thomas Gleixner, netdev, linux-fsdevel, linux-kernel, jannik Winkel, Marco Schinkel, David S. Miller, stable Hi Herbert, Am 07.12.2015 um 02:20 schrieb Herbert Xu: > On Sun, Dec 06, 2015 at 09:56:34PM +0100, Stefan Priebe wrote: >> Hi Herbert, >> >> i think i found the issue in 4.1 with netlink. Somebody made a >> mistake while backporting or cherry-picking your patch "netlink: Fix >> autobind race condition that leads to zero port ID" to 4.1. >> >> It misses a goto in 4.1. >> >> This goto is missing in 4.1: >> >> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c >> index 4017e12..f15c001 100644 >> --- a/net/netlink/af_netlink.c >> +++ b/net/netlink/af_netlink.c >> @@ -1132,7 +1132,6 @@ static int netlink_insert(struct sock *sk, u32 portid) >> if (err == -EEXIST) >> err = -EADDRINUSE; >> sock_put(sk); >> - goto err; >> } >> >> /* We need to ensure that the socket is hashed and visible. */ >> >> Can you please confirm, that this is not correct and might cause >> those issues. > > Well spotted! Yes this would be a fatal error and can cause the > problems you guys are seeing. Thanks, good. Can you help me to get this fix upstream into the stable lines? Stefan > > Thanks, > ^ permalink raw reply [flat|nested] 6+ messages in thread
* netlink: Add missing goto statement to netlink_insert 2015-12-07 6:58 ` Stefan Priebe - Profihost AG @ 2015-12-08 6:13 ` Herbert Xu 2015-12-08 16:21 ` David Miller ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Herbert Xu @ 2015-12-08 6:13 UTC (permalink / raw) To: Stefan Priebe - Profihost AG Cc: Hannes Frederic Sowa, Florian Weimer, Thomas Gleixner, netdev, linux-fsdevel, linux-kernel, jannik Winkel, Marco Schinkel, David S. Miller, stable On Mon, Dec 07, 2015 at 07:58:25AM +0100, Stefan Priebe - Profihost AG wrote: > > Thanks, good. Can you help me to get this fix upstream into the stable > lines? Sure. Greg, please apply this patch to fix up the backport for 4.1. ---8<--- The backport of 1f770c0a09da855a2b51af6d19de97fb955eca85 ("netlink: Fix autobind race condition that leads to zero port ID") missed a goto statement, which causes netlink to break subtly. This was discovered by Stefan Priebe <s.priebe@profihost.ag>. Fixes: 4e2776241766 ("netlink: Fix autobind race condition that...") Reported-by: Stefan Priebe <s.priebe@profihost.ag> Reported-by: Philipp Hahn <pmhahn@pmhahn.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index d139c43..0d6038c 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1118,6 +1118,7 @@ static int netlink_insert(struct sock *sk, u32 portid) if (err == -EEXIST) err = -EADDRINUSE; sock_put(sk); + goto err; } /* We need to ensure that the socket is hashed and visible. */ -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: netlink: Add missing goto statement to netlink_insert 2015-12-08 6:13 ` netlink: Add missing goto statement to netlink_insert Herbert Xu @ 2015-12-08 16:21 ` David Miller 2015-12-09 3:29 ` Greg KH 2015-12-09 3:30 ` Patch "netlink: Add missing goto statement to netlink_insert" has been added to the 4.1-stable tree gregkh 2 siblings, 0 replies; 6+ messages in thread From: David Miller @ 2015-12-08 16:21 UTC (permalink / raw) To: herbert Cc: s.priebe, hannes, fweimer, tglx, netdev, linux-fsdevel, linux-kernel, j.winkel, m.schinkel, stable From: Herbert Xu <herbert@gondor.apana.org.au> Date: Tue, 8 Dec 2015 14:13:19 +0800 > On Mon, Dec 07, 2015 at 07:58:25AM +0100, Stefan Priebe - Profihost AG wrote: >> >> Thanks, good. Can you help me to get this fix upstream into the stable >> lines? > > Sure. Greg, please apply this patch to fix up the backport for 4.1. Herbert, thanks so much for taking care of this. > ---8<--- > The backport of 1f770c0a09da855a2b51af6d19de97fb955eca85 ("netlink: > Fix autobind race condition that leads to zero port ID") missed a > goto statement, which causes netlink to break subtly. > > This was discovered by Stefan Priebe <s.priebe@profihost.ag>. > > Fixes: 4e2776241766 ("netlink: Fix autobind race condition that...") > Reported-by: Stefan Priebe <s.priebe@profihost.ag> > Reported-by: Philipp Hahn <pmhahn@pmhahn.de> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: David S. Miller <davem@davemloft.net> > > diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c > index d139c43..0d6038c 100644 > --- a/net/netlink/af_netlink.c > +++ b/net/netlink/af_netlink.c > @@ -1118,6 +1118,7 @@ static int netlink_insert(struct sock *sk, u32 portid) > if (err == -EEXIST) > err = -EADDRINUSE; > sock_put(sk); > + goto err; > } > > /* We need to ensure that the socket is hashed and visible. */ > > -- > Email: Herbert Xu <herbert@gondor.apana.org.au> > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: netlink: Add missing goto statement to netlink_insert 2015-12-08 6:13 ` netlink: Add missing goto statement to netlink_insert Herbert Xu 2015-12-08 16:21 ` David Miller @ 2015-12-09 3:29 ` Greg KH 2015-12-09 3:30 ` Patch "netlink: Add missing goto statement to netlink_insert" has been added to the 4.1-stable tree gregkh 2 siblings, 0 replies; 6+ messages in thread From: Greg KH @ 2015-12-09 3:29 UTC (permalink / raw) To: Herbert Xu Cc: Stefan Priebe - Profihost AG, Hannes Frederic Sowa, Florian Weimer, Thomas Gleixner, netdev, linux-fsdevel, linux-kernel, jannik Winkel, Marco Schinkel, David S. Miller, stable On Tue, Dec 08, 2015 at 02:13:19PM +0800, Herbert Xu wrote: > On Mon, Dec 07, 2015 at 07:58:25AM +0100, Stefan Priebe - Profihost AG wrote: > > > > Thanks, good. Can you help me to get this fix upstream into the stable > > lines? > > Sure. Greg, please apply this patch to fix up the backport for 4.1. Now queued up, thanks for the fix. greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
* Patch "netlink: Add missing goto statement to netlink_insert" has been added to the 4.1-stable tree 2015-12-08 6:13 ` netlink: Add missing goto statement to netlink_insert Herbert Xu 2015-12-08 16:21 ` David Miller 2015-12-09 3:29 ` Greg KH @ 2015-12-09 3:30 ` gregkh 2 siblings, 0 replies; 6+ messages in thread From: gregkh @ 2015-12-09 3:30 UTC (permalink / raw) To: herbert, davem, fweimer, gregkh, hannes, j.winkel, m.schinkel, pmhahn, s.priebe, tglx Cc: stable, stable-commits This is a note to let you know that I've just added the patch titled netlink: Add missing goto statement to netlink_insert to the 4.1-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: netlink-add-missing-goto-statement-to-netlink_insert.patch and it can be found in the queue-4.1 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 herbert@gondor.apana.org.au Tue Dec 8 22:28:59 2015 From: Herbert Xu <herbert@gondor.apana.org.au> Date: Tue, 8 Dec 2015 14:13:19 +0800 Subject: netlink: Add missing goto statement to netlink_insert To: Stefan Priebe - Profihost AG <s.priebe@profihost.ag> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>, Florian Weimer <fweimer@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, jannik Winkel <j.winkel@profihost.ag>, Marco Schinkel <m.schinkel@profihost.ag>, "David S. Miller" <davem@davemloft.net>, stable@vger.kernel.org Message-ID: <20151208061319.GA16209@gondor.apana.org.au> Content-Disposition: inline From: Herbert Xu <herbert@gondor.apana.org.au> The backport of 1f770c0a09da855a2b51af6d19de97fb955eca85 ("netlink: Fix autobind race condition that leads to zero port ID") missed a goto statement, which causes netlink to break subtly. This was discovered by Stefan Priebe <s.priebe@profihost.ag>. Fixes: 4e2776241766 ("netlink: Fix autobind race condition that...") Reported-by: Stefan Priebe <s.priebe@profihost.ag> Reported-by: Philipp Hahn <pmhahn@pmhahn.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- net/netlink/af_netlink.c | 1 + 1 file changed, 1 insertion(+) --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1118,6 +1118,7 @@ static int netlink_insert(struct sock *s if (err == -EEXIST) err = -EADDRINUSE; sock_put(sk); + goto err; } /* We need to ensure that the socket is hashed and visible. */ Patches currently in stable-queue which might be from herbert@gondor.apana.org.au are queue-4.1/netlink-add-missing-goto-statement-to-netlink_insert.patch ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-09 3:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <564DC4A5.70104@profihost.ag>
[not found] ` <564DCC4C.1090009@redhat.com>
[not found] ` <564E2852.8000200@profihost.ag>
[not found] ` <56530A42.6030609@profihost.ag>
[not found] ` <1448283451.4019628.447573353.3659E447@webmail.messagingengine.com>
[not found] ` <565EBDC1.1090808@profihost.ag>
[not found] ` <8737vlt6xb.fsf@stressinduktion.org>
[not found] ` <5661DAC4.8040909@profihost.ag>
[not found] ` <20151205010819.GA21889@gondor.apana.org.au>
[not found] ` <5664A102.2030602@profihost.ag>
2015-12-07 1:20 ` Asterisk deadlocks since Kernel 4.1 Herbert Xu
2015-12-07 6:58 ` Stefan Priebe - Profihost AG
2015-12-08 6:13 ` netlink: Add missing goto statement to netlink_insert Herbert Xu
2015-12-08 16:21 ` David Miller
2015-12-09 3:29 ` Greg KH
2015-12-09 3:30 ` Patch "netlink: Add missing goto statement to netlink_insert" has been added to the 4.1-stable tree gregkh
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).