]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: nfs_igrab_and_active must first reference the superblock
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 10 Jan 2021 20:58:08 +0000 (15:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 14:48:44 +0000 (15:48 +0100)
commitd00e517fa8dfe5509dfb82c656b12cd13dca1a2e
treeea2de4acc0aa3b866b10213298a3d216aab831f0
parentbc04f6f240aa8c86389b2982fbaef8c7d6b3c119
NFS: nfs_igrab_and_active must first reference the superblock

commit 896567ee7f17a8a736cda8a28cc987228410a2ac upstream.

Before referencing the inode, we must ensure that the superblock can be
referenced. Otherwise, we can end up with iput() calling superblock
operations that are no longer valid or accessible.

Fixes: ea7c38fef0b7 ("NFSv4: Ensure we reference the inode for return-on-close in delegreturn")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/internal.h