From: npiggin@suse.de Date: Thu, 24 Jun 2010 03:02:14 +0000 (+1000) Subject: fs: fix superblock iteration race X-Git-Tag: v2.6.35-rc4~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57439f878afafefad8836ebf5c49da2a0a746105;p=pandora-kernel.git fs: fix superblock iteration race list_for_each_entry_safe is not suitable to protect against concurrent modification of the list. 6754af6 introduced a race in sb walking. list_for_each_entry can use the trick of pinning the current entry in the list before we drop and retake the lock because it subsequently follows cur->next. However list_for_each_entry_safe saves n=cur->next for following before entering the loop body, so when the lock is dropped, n may be deleted. Signed-off-by: Nick Piggin Cc: Christoph Hellwig Cc: John Stultz Cc: Frank Mayhar Cc: Al Viro Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed