Re: [PATCH v3] nfsd4: fix memory leak in nfsd4_encode_fattr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> 
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux