Subject: [merged] zram-fix-race-between-reset-and-flushing-pending-work.patch
removed from -mm tree
To:
[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 31 Jan 2014 11:16:21 -0800
The patch titled
Subject: zram: fix race between reset and flushing pending work
has been removed from the -mm tree. Its filename was
zram-fix-race-between-reset-and-flushing-pending-work.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Minchan Kim <[email protected]>
Subject: zram: fix race between reset and flushing pending work
Dan and Sergey reported that there is a racy between reset and flushing of
pending work so that it could make oops by freeing zram->meta in reset
while zram_slot_free can access zram->meta if new request is adding during
the race window.
This patch moves flush after taking init_lock so it prevents new request
so that it closes the race.
Signed-off-by: Minchan Kim <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Jerome Marchand <[email protected]>
Tested-by: Sergey Senozhatsky <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
drivers/block/zram/zram_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN
drivers/block/zram/zram_drv.c~zram-fix-race-between-reset-and-flushing-pending-work
drivers/block/zram/zram_drv.c
---
a/drivers/block/zram/zram_drv.c~zram-fix-race-between-reset-and-flushing-pending-work
+++ a/drivers/block/zram/zram_drv.c
@@ -553,14 +553,14 @@ static void zram_reset_device(struct zra
size_t index;
struct zram_meta *meta;
- flush_work(&zram->free_work);
-
down_write(&zram->init_lock);
if (!zram->init_done) {
up_write(&zram->init_lock);
return;
}
+ flush_work(&zram->free_work);
+
meta = zram->meta;
zram->init_done = 0;
_
Patches currently in -mm which might be from [email protected] are
origin.patch
mm-remove-bug_on-from-mlock_vma_page.patch
swap-add-a-simple-detector-for-inappropriate-swapin-readahead.patch
debugging-keep-track-of-page-owners.patch
--
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