[PATCH md 006 of 7] Ensure bitmap_writeback_daemon handles shutdown properly.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <neilb@xxxxxxxxxxxxxxx>

### Diffstat output
 ./drivers/md/bitmap.c |    3 +++
 1 file changed, 3 insertions(+)

diff ./drivers/md/bitmap.c~current~ ./drivers/md/bitmap.c
--- ./drivers/md/bitmap.c~current~	2005-08-29 16:32:20.000000000 +1000
+++ ./drivers/md/bitmap.c	2005-08-29 16:46:50.000000000 +1000
@@ -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 */
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux