]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Dec 2013 18:33:32 +0000 (10:33 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Dec 2013 18:33:32 +0000 (10:33 -0800)
added patches:
nfsd-use-init_net-for-portmapper.patch

queue-3.4/nfsd-use-init_net-for-portmapper.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/nfsd-use-init_net-for-portmapper.patch b/queue-3.4/nfsd-use-init_net-for-portmapper.patch
new file mode 100644 (file)
index 0000000..e90eb01
--- /dev/null
@@ -0,0 +1,42 @@
+From f7fb86c6e639360ad9c253cec534819ef928a674 Mon Sep 17 00:00:00 2001
+From: Stanislav Kinsbursky <skinsbursky@parallels.com>
+Date: Mon, 10 Dec 2012 12:19:04 +0300
+Subject: nfsd: use "init_net" for portmapper
+
+From: Stanislav Kinsbursky <skinsbursky@parallels.com>
+
+commit f7fb86c6e639360ad9c253cec534819ef928a674 upstream.
+
+There could be a situation, when NFSd was started in one network namespace, but
+stopped in another one.
+This will trigger kernel panic, because RPCBIND client is stored on per-net
+NFSd data, and will be NULL on NFSd shutdown.
+
+Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfsd/nfssvc.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/fs/nfsd/nfssvc.c
++++ b/fs/nfsd/nfssvc.c
+@@ -11,7 +11,6 @@
+ #include <linux/module.h>
+ #include <linux/fs_struct.h>
+ #include <linux/swap.h>
+-#include <linux/nsproxy.h>
+ #include <linux/sunrpc/stats.h>
+ #include <linux/sunrpc/svcsock.h>
+@@ -330,7 +329,7 @@ static int nfsd_get_default_max_blksize(
+ int nfsd_create_serv(void)
+ {
+       int error;
+-      struct net *net = current->nsproxy->net_ns;
++      struct net *net = &init_net;
+       WARN_ON(!mutex_is_locked(&nfsd_mutex));
+       if (nfsd_serv) {
index c2dfa6859f98935da8401b7fe8f4ebe59dcda235..582173786c4ec10de24d499110c5cc3f351f6770 100644 (file)
@@ -24,3 +24,4 @@ ipv6-fix-possible-seqlock-deadlock-in-ip6_finish_output2.patch
 pktgen-xfrm-update-ipv4-header-total-len-and-checksum-after-tranformation.patch
 hid-picolcd_core-validate-output-report-details.patch
 mmc-block-fix-a-bug-of-error-handling-in-mmc-driver.patch
+nfsd-use-init_net-for-portmapper.patch