Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1286259
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | netlink: Add missing goto statement to netlink_insert |
| Date | 2015-12-08 07:20 +0100 |
| Message-ID | <qDjMZ-733-7@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <qC3hh-6hF-41@gated-at.bofh.it> <qC9wm-1TA-15@gated-at.bofh.it> <qCOzw-3pN-5@gated-at.bofh.it> <qCSMO-6cJ-5@gated-at.bofh.it> <qCXWa-ZJ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Asterisk deadlocks since Kernel 4.1 Stefan Priebe - Profihost AG <s.priebe@profihost.ag> - 2015-12-02 10:50 +0100
Re: Asterisk deadlocks since Kernel 4.1 Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-12-02 12:50 +0100
Re: Asterisk deadlocks since Kernel 4.1 Philipp Hahn <pmhahn@pmhahn.de> - 2015-12-02 19:00 +0100
Re: Asterisk deadlocks since Kernel 4.1 Stefan Priebe - Profihost AG <s.priebe@profihost.ag> - 2015-12-03 09:30 +0100
Re: Asterisk deadlocks since Kernel 4.1 Stefan Priebe <s.priebe@profihost.ag> - 2015-12-04 19:30 +0100
Re: Asterisk deadlocks since Kernel 4.1 Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-05 02:10 +0100
Re: Asterisk deadlocks since Kernel 4.1 Stefan Priebe <s.priebe@profihost.ag> - 2015-12-06 22:00 +0100
Re: Asterisk deadlocks since Kernel 4.1 Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-07 02:30 +0100
Re: Asterisk deadlocks since Kernel 4.1 Stefan Priebe - Profihost AG <s.priebe@profihost.ag> - 2015-12-07 08:00 +0100
netlink: Add missing goto statement to netlink_insert Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-08 07:20 +0100
Re: netlink: Add missing goto statement to netlink_insert David Miller <davem@davemloft.net> - 2015-12-08 17:30 +0100
Re: netlink: Add missing goto statement to netlink_insert Greg KH <greg@kroah.com> - 2015-12-09 04:40 +0100
Re: Asterisk deadlocks since Kernel 4.1 Philipp Hahn <pmhahn@pmhahn.de> - 2015-12-07 08:50 +0100
Re: Asterisk deadlocks since Kernel 4.1 Philipp Matthias Hahn <pmhahn@pmhahn.de> - 2015-12-05 15:20 +0100
Re: Asterisk deadlocks since Kernel 4.1 Stefan Priebe <s.priebe@profihost.ag> - 2015-12-05 16:40 +0100
Re: Asterisk deadlocks since Kernel 4.1 Philipp Hahn <pmhahn@pmhahn.de> - 2015-12-02 19:00 +0100
Re: Asterisk deadlocks since Kernel 4.1 Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-12-02 19:30 +0100
csiph-web