Subject: [merged] drivers-block-brdc-fix-brd_lookup_page-race.patch removed
from -mm tree
To:
[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 28 May 2013 12:37:11 -0700
The patch titled
Subject: drivers/block/brd.c: fix brd_lookup_page() race
has been removed from the -mm tree. Its filename was
drivers-block-brdc-fix-brd_lookup_page-race.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Brian Behlendorf <[email protected]>
Subject: 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 <[email protected]>
Reported-by: Chris Wedgwood <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
drivers/block/brd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/block/brd.c~drivers-block-brdc-fix-brd_lookup_page-race
drivers/block/brd.c
--- a/drivers/block/brd.c~drivers-block-brdc-fix-brd_lookup_page-race
+++ a/drivers/block/brd.c
@@ -117,13 +117,13 @@ static struct page *brd_insert_page(stru
spin_lock(&brd->brd_lock);
idx = sector >> PAGE_SECTORS_SHIFT;
+ page->index = idx;
if (radix_tree_insert(&brd->brd_pages, idx, page)) {
__free_page(page);
page = radix_tree_lookup(&brd->brd_pages, idx);
BUG_ON(!page);
BUG_ON(page->index != idx);
- } else
- page->index = idx;
+ }
spin_unlock(&brd->brd_lock);
radix_tree_preload_end();
_
Patches currently in -mm which might be from [email protected] are
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html