]> 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:48:40 +0000 (14:48 +0100)
commitdbe184f6be1e0408fdec44f836e0a42741fbd7a6
tree17859c58f2ceb06aef44e8e73ff22004c6e2b0a2
parentd52faa7fb12f444f70eae8b49b3d674ff8c8bf32
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