-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nfs: fix ABBA dead lock during dead client cleanup
Motivation: In situation where one thread tries to clean an expired client and an other thread checks client validity a dead lock may happen: T1 -> take lock on open states in FileTracker#addOpen T2 -> take lock on client object in NFS4Client#updateLeaseTime T2 -> waits for lock on open states in FileTracker#removeOpen T1 -> wait for lock on client objectin NFS4Client#isLeaseValid Modification: use volatile filed to make NFS4Client#isLeaseValid non blocking. Remove draining of states out of error path in NFS4Client#updateLeaseTime as draining done in dead-client cleanup phase. Add test to ensure that state disposal is called on client disposal. Result: deadlock is resolved. Fixes: #56 Acked-by: Albert Rossi Target: master, 0.17, 0.16, 0.15
- Loading branch information
Showing
2 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters