From: Amy Griffis Date: Sat, 20 May 2006 22:00:06 +0000 (-0700) Subject: [PATCH] fix race in inotify_release X-Git-Tag: v2.6.17-rc5~62 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66055a4e7334b05354c835123ff621c5f700e56a;p=pandora-kernel.git [PATCH] fix race in inotify_release While doing some inotify stress testing, I hit the following race. In inotify_release(), it's possible for a watch to be removed from the lists in between dropping dev->mutex and taking inode->inotify_mutex. The reference we hold prevents the watch from being freed, but not from being removed. Checking the dev's idr mapping will prevent a double list_del of the same watch. Signed-off-by: Amy Griffis Acked-by: John McCutchan Cc: Robert Love Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed