md-ensure-bitmap_writeback_daemon-handles-shutdown-properly.patch From: NeilBrown mddev->bitmap gets clearred before the writeback daemon is stopped. So the write_back daemon needs to be careful not to dereference the 'bitmap' if it is NULL. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- drivers/md/bitmap.c | 3 +++ 1 files changed, 3 insertions(+) diff -puN drivers/md/bitmap.c~md-ensure-bitmap_writeback_daemon-handles-shutdown-properly drivers/md/bitmap.c --- devel/drivers/md/bitmap.c~md-ensure-bitmap_writeback_daemon-handles-shutdown-properly 2005-08-29 23:44:34.000000000 -0700 +++ devel-akpm/drivers/md/bitmap.c 2005-08-29 23:44:34.000000000 -0700 @@ -1156,6 +1156,9 @@ static void bitmap_writeback_daemon(mdde err = -EINTR; goto out; } + if (bitmap == NULL) + /* about to be stopped. */ + return; PRINTK("%s: bitmap writeback daemon woke up...\n", bmname(bitmap)); /* wait on bitmap page writebacks */ _