nfsd4: fix unlikely race in session replay case
authorJ. Bruce Fields <bfields@citi.umich.edu>
Sat, 24 Apr 2010 19:35:43 +0000 (15:35 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 3 May 2010 12:32:31 +0000 (08:32 -0400)
commit26c0c75e69265961e891ed80b38fb62a548ab371
tree1ecbc767a1b2ad3e8f25d88e918076806d8c2eb1
parente0c8233622cbd49d171bc57b60e725f2fb748750
nfsd4: fix unlikely race in session replay case

In the replay case, the

renew_client(session->se_client);

happens after we've droppped the sessionid_lock, and without holding a
reference on the session; so there's nothing preventing the session
being freed before we get here.

Thanks to Benny Halevy for catching a bug in an earlier version of this
patch.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Acked-by: Benny Halevy <bhalevy@panasas.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
fs/nfsd/nfs4xdr.c