From: J. Bruce Fields Date: Wed, 20 Feb 2008 19:02:47 +0000 (-0500) Subject: lockd: fix race in nlm_release() X-Git-Tag: v2.6.26-rc1~1083^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=164f98adbbd50c67177b096a59f55c1a56a45c82;p=pandora-kernel.git lockd: fix race in nlm_release() The sm_count is decremented to zero but left on the nsm_handles list. So in the space between decrementing sm_count and acquiring nsm_mutex, it is possible for another task to find this nsm_handle, increment the use count and then enter nsm_release itself. Thus there's nothing to prevent the nsm being freed before we acquire nsm_mutex here. Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed