From: J. Bruce Fields Date: Mon, 3 Jan 2011 20:10:27 +0000 (-0500) Subject: svcrpc: take lock on turning entry NEGATIVE in cache_check X-Git-Tag: v2.6.38-rc1~51^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bab93f87ec703bf6650875881b11f9f27d7da56;p=pandora-kernel.git svcrpc: take lock on turning entry NEGATIVE in cache_check We attempt to turn a cache entry negative in place. But that entry may already have been filled in by some other task since we last checked whether it was valid, so we could be modifying an already-valid entry. If nothing else there's a likely leak in such a case when the entry is eventually put() and contents are not freed because it has CACHE_NEGATIVE set. So, take the cache_lock just as sunrpc_cache_update() does. Reviewed-by: NeilBrown Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed