]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Jan 2013 17:54:47 +0000 (09:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Jan 2013 17:54:47 +0000 (09:54 -0800)
added patches:
sunrpc-fix-validity-issues-with-rpc_pipefs-sb-s_fs_info.patch

queue-3.4/series
queue-3.4/sunrpc-fix-validity-issues-with-rpc_pipefs-sb-s_fs_info.patch [new file with mode: 0644]

index 59cbae1e0150d2b29c6f4b2c4db1fc67aefbfb38..bbdb155a30957d312d0088c9c02b56902362885c 100644 (file)
@@ -39,3 +39,4 @@ drm-radeon-fix-edp-clk-and-lane-setup-for-scaled-modes.patch
 drm-radeon-add-wait_until-to-evergreen-vm-safe-reg-list.patch
 drm-radeon-properly-handle-ddc-probe-for-dp-bridges.patch
 drm-i915-make-the-panel-fitter-work-on-pipes-b-and-c-on-ivb.patch
+sunrpc-fix-validity-issues-with-rpc_pipefs-sb-s_fs_info.patch
diff --git a/queue-3.4/sunrpc-fix-validity-issues-with-rpc_pipefs-sb-s_fs_info.patch b/queue-3.4/sunrpc-fix-validity-issues-with-rpc_pipefs-sb-s_fs_info.patch
new file mode 100644 (file)
index 0000000..80af510
--- /dev/null
@@ -0,0 +1,47 @@
+From 642fe4d00db56d65060ce2fd4c105884414acb16 Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+Date: Thu, 8 Nov 2012 10:01:26 -0500
+Subject: SUNRPC: Fix validity issues with rpc_pipefs sb->s_fs_info
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+commit 642fe4d00db56d65060ce2fd4c105884414acb16 upstream.
+
+rpc_kill_sb() must defer calling put_net() until after the notifier
+has been called, since most (all?) of the notifier callbacks assume
+that sb->s_fs_info points to a valid net namespace. It also must not
+call put_net() if the call to rpc_fill_super was unsuccessful.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48421
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/sunrpc/rpc_pipe.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/net/sunrpc/rpc_pipe.c
++++ b/net/sunrpc/rpc_pipe.c
+@@ -1157,14 +1157,19 @@ static void rpc_kill_sb(struct super_blo
+       struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
+       mutex_lock(&sn->pipefs_sb_lock);
++      if (sn->pipefs_sb != sb) {
++              mutex_unlock(&sn->pipefs_sb_lock);
++              goto out;
++      }
+       sn->pipefs_sb = NULL;
+       mutex_unlock(&sn->pipefs_sb_lock);
+-      put_net(net);
+       dprintk("RPC:   sending pipefs UMOUNT notification for net %p%s\n", net,
+                                                               NET_NAME(net));
+       blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
+                                          RPC_PIPEFS_UMOUNT,
+                                          sb);
++      put_net(net);
++out:
+       kill_litter_super(sb);
+ }