Skip to content
Commit dfd20b2b authored by Brian Behlendorf's avatar Brian Behlendorf Committed by Linus Torvalds
Browse files

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: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
Reported-by: default avatarChris Wedgwood <cw@f00f.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e5ee7305
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment