Chuck Lever 885848186f nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock
nfsd4_release_lockowner finds a lock owner that has no lock state,
and drops cl_lock. Then release_lockowner picks up cl_lock and
unhashes the lock owner.

During the window where cl_lock is dropped, I don't see anything
preventing a concurrent nfsd4_lock from finding that same lock owner
and adding lock state to it.

Move release_lockowner() into nfsd4_release_lockowner and hang onto
the cl_lock until after the lock owner's state cannot be found
again.

Found by inspection, we don't currently have a reproducer.

Fixes: 2c41beb0e5cf ("nfsd: reduce cl_lock thrashing in ... ")
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2016-07-15 15:31:31 -04:00
..
2014-07-08 17:14:27 -04:00
2016-03-18 11:42:53 -04:00
2014-08-17 12:00:12 -04:00
2016-07-13 15:53:41 -04:00
2016-01-22 18:04:28 -05:00
2016-07-13 15:53:41 -04:00
2016-01-14 17:32:51 -05:00
2016-05-01 19:58:39 -04:00
2015-02-02 18:09:43 +01:00