From: Jeff Layton Date: Wed, 30 Jul 2014 01:34:40 +0000 (-0400) Subject: nfsd: close potential race in nfsd4_free_stateid X-Git-Tag: omap-for-v3.17/fixes-against-rc2~101^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc5a96c3b70d00c863f69ff4ea7f5dfddbcbc0d8;p=pandora-kernel.git nfsd: close potential race in nfsd4_free_stateid Once we remove the client_mutex, it'll be possible for the sc_type of a lock stateid to change after it's found and checked, but before we can go to destroy it. If that happens, we can end up putting the persistent reference to the stateid more than once, and unhash it more than once. Fix this by unhashing the lock stateid prior to dropping the cl_lock but after finding it. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed