From db97bd18c8c36a6d954b1c7b1b04c5a8681214f3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 8 Dec 2015 22:30:00 -0500 Subject: [PATCH] 4.1-stable patches added patches: netlink-add-missing-goto-statement-to-netlink_insert.patch --- ...ing-goto-statement-to-netlink_insert.patch | 38 +++++++++++++++++++ queue-4.1/series | 1 + 2 files changed, 39 insertions(+) create mode 100644 queue-4.1/netlink-add-missing-goto-statement-to-netlink_insert.patch diff --git a/queue-4.1/netlink-add-missing-goto-statement-to-netlink_insert.patch b/queue-4.1/netlink-add-missing-goto-statement-to-netlink_insert.patch new file mode 100644 index 00000000000..03e5fe159c4 --- /dev/null +++ b/queue-4.1/netlink-add-missing-goto-statement-to-netlink_insert.patch @@ -0,0 +1,38 @@ +From herbert@gondor.apana.org.au Tue Dec 8 22:28:59 2015 +From: Herbert Xu +Date: Tue, 8 Dec 2015 14:13:19 +0800 +Subject: netlink: Add missing goto statement to netlink_insert +To: Stefan Priebe - Profihost AG +Cc: Hannes Frederic Sowa , Florian Weimer , Thomas Gleixner , netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, jannik Winkel , Marco Schinkel , "David S. Miller" , stable@vger.kernel.org +Message-ID: <20151208061319.GA16209@gondor.apana.org.au> +Content-Disposition: inline + +From: Herbert Xu + +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 . + +Fixes: 4e2776241766 ("netlink: Fix autobind race condition that...") +Reported-by: Stefan Priebe +Reported-by: Philipp Hahn +Signed-off-by: Herbert Xu +Acked-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + 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. */ diff --git a/queue-4.1/series b/queue-4.1/series index 216a1aadf10..dbc62421df8 100644 --- a/queue-4.1/series +++ b/queue-4.1/series @@ -93,3 +93,4 @@ tty-fix-tty_send_xchar-lock-order-inversion.patch xhci-workaround-to-get-intel-xhci-reset-working-more-reliably.patch staging-lustre-use-jiffies-for-lp_last_query-times.patch kvm-s390-enable-simd-only-when-no-vcpus-were-created.patch +netlink-add-missing-goto-statement-to-netlink_insert.patch -- 2.47.3