lockd: nlm_blocked list race fixes
authorAlexander Aring <aahringo@redhat.com>
Thu, 20 Jul 2023 12:58:04 +0000 (08:58 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 29 Aug 2023 21:45:22 +0000 (17:45 -0400)
commitbe2be5f7f4436442d8f6bffbb97a6f438df2896b
tree72c01ef29314e20387f9133a369e8346402b7bfb
parentf2b7019d2e3c4f1f55be658659804b337dcfac60
lockd: nlm_blocked list race fixes

This patch fixes races when lockd accesses the global nlm_blocked list.
It was mostly safe to access the list because everything was accessed
from the lockd kernel thread context but there exist cases like
nlmsvc_grant_deferred() that could manipulate the nlm_blocked list and
it can be called from any context.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svclock.c