From: Jeff Layton Date: Fri, 22 Aug 2014 14:18:44 +0000 (-0400) Subject: locks: close potential race in lease_get_mtime X-Git-Tag: fixes-against-v3.18-rc2~119^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfe8602436c803c6d5e271d52cd985d491a7470a;p=pandora-kernel.git locks: close potential race in lease_get_mtime lease_get_mtime is called without the i_lock held, so there's no guarantee about the stability of the list. Between the time when we assign "flock" and then dereference it to check whether it's a lease and for write, the lease could be freed. Ensure that that doesn't occur by taking the i_lock before trying to check the lease. Cc: J. Bruce Fields Signed-off-by: Jeff Layton Reviewed-by: Christoph Hellwig --- Reading git-diff-tree failed