diff options
author | NeilBrown <[email protected]> | 2024-04-08 12:09:18 +1000 |
---|---|---|
committer | Chuck Lever <[email protected]> | 2024-05-06 09:07:16 -0400 |
commit | 56c35f43eef013579c76c007ba1f386d8c2cac14 (patch) | |
tree | a27365a76104714cfd5ffe6ec14087369565941f /tools/perf/scripts/python/export-to-sqlite.py | |
parent | eec7620800081e27dbf8019ac2e66259f0d5bf6f (diff) |
nfsd: drop st_mutex before calling move_to_close_lru()
move_to_close_lru() is currently called with ->st_mutex held.
This can lead to a deadlock as move_to_close_lru() waits for sc_count to
drop to 2, and some threads holding a reference might be waiting for the
mutex. These references will never be dropped so sc_count will never
reach 2.
There can be no harm in dropping ->st_mutex before
move_to_close_lru() because the only place that takes the mutex is
nfsd4_lock_ol_stateid(), and it quickly aborts if sc_type is
NFS4_CLOSED_STID, which it will be before move_to_close_lru() is called.
See also
https://lore.kernel.org/lkml/[email protected]/T/
where this problem was raised but not successfully resolved.
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions