WSL2-Linux-Kernel/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: stable@kernel.org
Reported-by: Rabin Vincent <rabin@rab.in>
Tested-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
2012-02-06 11:17:25 +08:00
..
events writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue 2012-02-06 11:17:25 +08:00
define_trace.h Revert "tracing: Include module.h in define_trace.h" 2011-10-31 19:32:35 -04:00
ftrace.h perf: Fix counter of ftrace events 2011-10-04 11:07:54 +02:00
syscall.h