Patchwork [3.5.y.z,extended,stable] Patch "nfsd: Fix memleak" has been added to staging queue

mail settings
Submitter Luis Henriques
Date March 4, 2013, 8:48 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/224797/
State New
Headers show


Luis Henriques - March 4, 2013, 8:48 p.m.
This is a note to let you know that I have just added a patch titled

    nfsd: Fix memleak

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 2548f809cc9a0022875e2f1be009d217a7dd523c Mon Sep 17 00:00:00 2001
From: majianpeng <>
Date: Tue, 29 Jan 2013 13:16:06 +0800
Subject: [PATCH] nfsd: Fix memleak

commit 2d32b29a1c2830f7c42caa8258c714acd983961f upstream.

When free nfs-client, it must free the ->cl_stateids.

Signed-off-by: Jianpeng Ma <>
Signed-off-by: J. Bruce Fields <>
Signed-off-by: Luis Henriques <>
 fs/nfsd/nfs4state.c | 2 ++
 1 file changed, 2 insertions(+)



diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 6ca92b1..c4daf96 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1090,6 +1090,8 @@  free_client(struct nfs4_client *clp)
+	idr_remove_all(&clp->cl_stateids);
+	idr_destroy(&clp->cl_stateids);