]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 8 Jan 2021 11:25:24 +0000 (12:25 +0100)
commit065aa28cafe9c5ddab38790ecc2ffaf31cd655ed
tree0f8630437e670aaee645c0c8cb977d841bb4a77e
parent802f1cfb8450146bc4b79424b362866f4cc08c9d
NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode

BugLink: https://bugs.launchpad.net/bugs/1910742
[ 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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/nfs/nfs4super.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h