From: Brian Behlendorf Date: Fri, 24 May 2013 22:55:28 +0000 (-0700) Subject: drivers/block/brd.c: fix brd_lookup_page() race X-Git-Tag: v3.10-rc3~12^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd20b2b174d3a9b258ea3b7a35ead33576587b1;p=pandora-kernel.git drivers/block/brd.c: fix brd_lookup_page() race The index on the page must be set before it is inserted in the radix tree. Otherwise there is a small race which can occur during lookup where the page can be found with the incorrect index. This will trigger the BUG_ON() in brd_lookup_page(). Signed-off-by: Brian Behlendorf Reported-by: Chris Wedgwood Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed