From: "J. Bruce Fields" <bfields@fieldses.org>
To: "Yan, Zheng" <zheng.z.yan@intel.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd4: fix memory leak in nfsd4_encode_fattr()
Date: Mon, 31 Mar 2014 17:11:34 -0400 [thread overview]
Message-ID: <20140331211134.GD20024@fieldses.org> (raw)
In-Reply-To: <1394427127-9985-1-git-send-email-zheng.z.yan@intel.com>
On Mon, Mar 10, 2014 at 12:52:07PM +0800, Yan, Zheng wrote:
> fh_put() does not free the temporary file handle.
Applying, sorry for the delay.--b.
>
> Signed-off-by: Yan, Zheng <zheng.z.yan@intel.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 63f2395..8de4c9d 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -2499,8 +2499,10 @@ out:
> security_release_secctx(context, contextlen);
> #endif /* CONFIG_NFSD_V4_SECURITY_LABEL */
> kfree(acl);
> - if (tempfh)
> + if (tempfh) {
> fh_put(tempfh);
> + kfree(tempfh);
> + }
> return status;
> out_nfserr:
> status = nfserrno(err);
> --
> 1.8.5.3
>
prev parent reply other threads:[~2014-03-31 21:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 4:52 [PATCH] nfsd4: fix memory leak in nfsd4_encode_fattr() Yan, Zheng
2014-03-10 8:04 ` Christoph Hellwig
2014-03-10 8:29 ` Yan, Zheng
2014-03-31 21:11 ` J. Bruce Fields [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140331211134.GD20024@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=zheng.z.yan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).