From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Yan, Zheng" <zheng.z.yan@intel.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v3] nfsd4: fix memory leak in nfsd4_encode_fattr()
Date: Mon, 31 Mar 2014 17:11:01 -0400 [thread overview]
Message-ID: <20140331211100.GC20024@fieldses.org> (raw)
In-Reply-To: <20140310102101.GA25752@infradead.org>
On Mon, Mar 10, 2014 at 03:21:01AM -0700, Christoph Hellwig wrote:
> On Mon, Mar 10, 2014 at 05:41:41PM +0800, Yan, Zheng wrote:
> > The temporary file handle should be freed when nfsd4_encode_fattr()
> > finishes its job. Christoph Hellwig suggests to move the code that
> > generates the temporary file handle into nfsd4_encode_dirent_fattr()
> >
> > Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
>
> I'd also add a BUG_ON to assert we have the file handle if needed in
> nfsd4_encode_fattr.
>
> But maybe I was a bit too fast in my initial reply and we should put in
> your simple fix first for the current -rc and -stable and have the
> cleanup on top of it. There's a lot more refactoring that should be
> done to nfsd4_encode_fattr anyway.
Makes sense; applying the bare fix for 3.15 with a stable cc, assuming
somebody will follow up with any cleanup. (Moving this case to
nfsd4_encode_dirent_fattr() as in this patch certianly looks fine to
me.)
--b.
prev parent reply other threads:[~2014-03-31 21:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 9:41 [PATCH v3] nfsd4: fix memory leak in nfsd4_encode_fattr() Yan, Zheng
2014-03-10 10:21 ` Christoph Hellwig
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=20140331211100.GC20024@fieldses.org \
--to=bfields@fieldses.org \
--cc=hch@infradead.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).