[3.8.y.z extended stable] Patch "nfsd4: fix memory leak in nfsd4_encode_fattr()" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Apr 17 23:30:13 UTC 2014
This is a note to let you know that I have just added a patch titled
nfsd4: fix memory leak in nfsd4_encode_fattr()
to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
This patch is scheduled to be released in version 3.8.13.22.
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.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From f61a27fd17d8fea8e28ae06ac21257631cf38d65 Mon Sep 17 00:00:00 2001
From: "Yan, Zheng" <zheng.z.yan at intel.com>
Date: Mon, 10 Mar 2014 12:52:07 +0800
Subject: nfsd4: fix memory leak in nfsd4_encode_fattr()
commit 18df11d0eacf67bbcd8dda755b568bbbd7264735 upstream.
fh_put() does not free the temporary file handle.
Signed-off-by: Yan, Zheng <zheng.z.yan at intel.com>
Signed-off-by: J. Bruce Fields <bfields at redhat.com>
[ kamal: backport to 3.8 (context) ]
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
fs/nfsd/nfs4xdr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index dc12d02..1418028 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2430,8 +2430,10 @@ out_acl:
out:
kfree(acl);
- if (fhp == &tempfh)
+ if (fhp == &tempfh) {
fh_put(&tempfh);
+ kfree(tempfh);
+ }
return status;
out_nfserr:
status = nfserrno(err);
--
1.9.1
More information about the kernel-team
mailing list