This is a note to let you know that I've just added the patch titled
NFSv4: Fix a memory leak in nfs4_discover_server_trunking
to the 3.8-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:
nfsv4-fix-a-memory-leak-in-nfs4_discover_server_trunking.patch
and it can be found in the queue-3.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From b193d59a4863ea670872d76dc99231ddeb598625 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Thu, 4 Apr 2013 15:55:00 -0400
Subject: NFSv4: Fix a memory leak in nfs4_discover_server_trunking
From: Trond Myklebust <[email protected]>
commit b193d59a4863ea670872d76dc99231ddeb598625 upstream.
When we assign a new rpc_client to clp->cl_rpcclient, we need to destroy
the old one.
Signed-off-by: Trond Myklebust <[email protected]>
Cc: Chuck Lever <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/nfs/nfs4state.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1877,7 +1877,13 @@ again:
status = PTR_ERR(clnt);
break;
}
- clp->cl_rpcclient = clnt;
+ /* Note: this is safe because we haven't yet marked the
+ * client as ready, so we are the only user of
+ * clp->cl_rpcclient
+ */
+ clnt = xchg(&clp->cl_rpcclient, clnt);
+ rpc_shutdown_client(clnt);
+ clnt = clp->cl_rpcclient;
goto again;
case -NFS4ERR_MINOR_VERS_MISMATCH:
Patches currently in stable-queue which might be from
[email protected] are
queue-3.8/nfsv4-4.1-fix-bugs-in-nfs4_walk_client_list.patch
queue-3.8/sunrpc-remove-extra-xprt_put.patch
queue-3.8/nfsv4-fix-a-memory-leak-in-nfs4_discover_server_trunking.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