* Patch "netlink: Reset portid after netlink_insert failure" has been added to the 4.0-stable tree
@ 2015-06-13 17:02 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-06-13 17:02 UTC (permalink / raw)
To: herbert, davem, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
netlink: Reset portid after netlink_insert failure
to the 4.0-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-reset-portid-after-netlink_insert-failure.patch
and it can be found in the queue-4.0 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 foo@baz Sat Jun 13 09:48:35 PDT 2015
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 16 May 2015 21:50:28 +0800
Subject: netlink: Reset portid after netlink_insert failure
From: Herbert Xu <herbert@gondor.apana.org.au>
[ Upstream commit c0bb07df7d981e4091432754e30c9c720e2c0c78 ]
The commit c5adde9468b0714a051eac7f9666f23eb10b61f7 ("netlink:
eliminate nl_sk_hash_lock") breaks the autobind retry mechanism
because it doesn't reset portid after a failed netlink_insert.
This means that should autobind fail the first time around, then
the socket will be stuck in limbo as it can never be bound again
since it already has a non-zero portid.
Fixes: c5adde9468b0 ("netlink: eliminate nl_sk_hash_lock")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-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
@@ -1069,6 +1069,7 @@ static int netlink_insert(struct sock *s
err = 0;
if (!__netlink_insert(table, sk)) {
err = -EADDRINUSE;
+ nlk_sk(sk)->portid = 0;
sock_put(sk);
}
Patches currently in stable-queue which might be from herbert@gondor.apana.org.au are
queue-4.0/netlink-disable-insertions-removals-during-rehash.patch
queue-4.0/netlink-reset-portid-after-netlink_insert-failure.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-13 17:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-13 17:02 Patch "netlink: Reset portid after netlink_insert failure" has been added to the 4.0-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).