]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: Ensure the delegation is pinned in nfs_do_return_delegation()
authorTrond Myklebust <trondmy@gmail.com>
Thu, 13 Feb 2020 19:51:06 +0000 (14:51 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Feb 2020 21:18:50 +0000 (16:18 -0500)
commitbcd06f6a6762f8491d15d2f9dfa4ffb7eeb795d4
treeb4af6d59d60f5e555082220cdde1798610e5dff9
parent112d5784716677fbdcd6659c240670f7aa0022bb
NFSv4: Ensure the delegation is pinned in nfs_do_return_delegation()

The call to nfs_do_return_delegation() needs to be taken without
any RCU locks. Add a refcount to make sure the delegation remains
pinned in memory until we're done.

Fixes: c4b13d8bb821 ("NFSv4: Fix races between open and delegreturn")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/delegation.c
fs/nfs/delegation.h