Re: [PATCH v2 001/117] nfsd: fix file access refcount leak when nfsd4_truncate fails

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

 



On Thu, Jun 26, 2014 at 03:24:12PM -0400, Jeff Layton wrote:
> On Thu, 26 Jun 2014 15:11:41 -0400
> Jeff Layton <jlayton@xxxxxxxxxxxxxxx> wrote:
> 
> > From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> > 
> > nfsd4_process_open2 will currently will get access to the file, and then
> > call nfsd4_truncate to (possibly) truncate it. If that operation fails
> > though, then the access references will never be released as the
> > nfs4_ol_stateid is never initialized.
> > 
> > Fix by moving the nfsd4_truncate call into nfs4_get_vfs_file, ensuring
> > that the refcounts are properly put if the truncate fails.
> > 
> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
> > Signed-off-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> 
> Christoph, I took the liberty of composing a commit log and adding your
> SOB line here. Let me know if you have any objections.

Thanks, I should have done that myself earlier.

--
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