summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-07-09 13:40:28 -0400
committerChuck Lever <cel@kernel.org>2026-08-10 09:54:35 -0400
commit7b4f8a1586c42d3afc3c0ac779af2db7ab1a5c55 (patch)
tree121d9d2a712c50b9ad247f3604124301e9a4b863 /tools/perf/scripts/python/net_dropmonitor.py
parent2108de53568a64936a0da3e04d85c35df98d3fb6 (diff)
NFSD: Prevent client use-after-free during NFSv4.0 revoked-state cleanup
nfs40_clean_admin_revoked() takes a stateid reference under clp->cl_lock, drops nn->client_lock, and calls nfsd4_drop_revoked_stid(), which dereferences the stateid's client through s->sc_client->cl_lock. The stateid reference does not pin the client, so a teardown racing the dropped lock can free the client while nfsd4_drop_revoked_stid() is still using it. This cleanup runs from the laundromat, so a periodic sweep can race force_expire_client() driven by a write to the clients/<id>/ctl file. Skip a client that is already expiring and otherwise pin it with cl_rpc_users under client_lock before dropping the lock, matching nfsd4_revoke_states(). Fixes: d688d8585e6b ("nfsd: allow admin-revoked NFSv4.0 state to be freed.") Cc: stable@vger.kernel.org Reviewed-by: NeilBrown <neil@brown.name> Reviewed-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260709-cel-v4-5-1d519d9be0cb@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions