]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix 2 use after free issues in the I/O code
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 9 Sep 2017 01:28:11 +0000 (21:28 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 9 Sep 2017 02:07:52 +0000 (22:07 -0400)
commit89fbd69619583b93377de245d5ce99915b0bee5d
tree96e44b7ef1fbfb23c69076f96c4987e397f9333e
parente77984f4c645a63560b72de4f989d6948497b2e2
NFS: Fix 2 use after free issues in the I/O code

The writeback code wants to send a commit after processing the pages,
which is why we want to delay releasing the struct path until after
that's done.

Also, the layout code expects that we do not free the inode before
we've put the layout segments in pnfs_writehdr_free() and
pnfs_readhdr_free()

Fixes: ff03c1fe0f89 ("NFS: Ensure we commit after writeback is complete")
Fixes: 78560a14fc5b ("nfs: remove pgio_header refcount, related cleanup")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/internal.h
fs/nfs/pagelist.c
fs/nfs/pnfs.c