]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 25 Nov 2020 17:06:14 +0000 (12:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jan 2021 13:45:01 +0000 (14:45 +0100)
commit05a0aec6787885a335a9d3cec7e1cfffee253b84
tree9652556b093435107c90e4fd5762347b30d46c4f
parentf2dc273475894b50841647c1ee180834c2836c9e
NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode

[ Upstream commit b6d49ecd1081740b6e632366428b960461f8158b ]

When returning the layout in nfs4_evict_inode(), we need to ensure that
the layout is actually done being freed before we can proceed to free the
inode itself.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4super.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h