Files
Linux/include/trace
Wu Fengguang 977b7e3a52 writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue
When a SD card is hot removed without umount, del_gendisk() will call
bdi_unregister() without destroying/freeing it. This leaves the bdi in
the bdi->dev = NULL, bdi->wb.task = NULL, bdi->bdi_list removed state.

When sync(2) gets the bdi before bdi_unregister() and calls
bdi_queue_work() after the unregister, trace_writeback_queue will be
dereferencing the NULL bdi->dev. Fix it with a simple test for NULL.

LKML-reference: http://lkml.org/lkml/2012/1/18/346
Cc: [email protected]
Reported-by: Rabin Vincent <[email protected]>
Tested-by: Namjae Jeon <[email protected]>
Signed-off-by: Wu Fengguang <[email protected]>
2012-02-06 11:17:25 +08:00
..
2011-10-04 11:07:54 +02:00
…