This is a note to let you know that I've just added the patch titled
SUNRPC: Fix validity issues with rpc_pipefs sb->s_fs_info
to the 3.4-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:
sunrpc-fix-validity-issues-with-rpc_pipefs-sb-s_fs_info.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 642fe4d00db56d65060ce2fd4c105884414acb16 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Thu, 8 Nov 2012 10:01:26 -0500
Subject: SUNRPC: Fix validity issues with rpc_pipefs sb->s_fs_info
From: Trond Myklebust <[email protected]>
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 <[email protected]>
Cc: Stanislav Kinsbursky <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
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);
}
Patches currently in stable-queue which might be from
[email protected] are
queue-3.4/sunrpc-fix-validity-issues-with-rpc_pipefs-sb-s_fs_info.patch
queue-3.4/sunrpc-continue-run-over-clients-list-on-pipefs-event-instead-of-break.patch
queue-3.4/sunrpc-ensure-that-we-free-the-rpc_task-after-cleanups-are-done.patch
queue-3.4/sunrpc-ensure-we-release-the-socket-write-lock-if-the-rpc_task-exits-early.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html