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> |
||
|---|---|---|
| .. | ||
| 9p.h | ||
| asoc.h | ||
| block.h | ||
| btrfs.h | ||
| compaction.h | ||
| ext3.h | ||
| ext4.h | ||
| gfpflags.h | ||
| gpio.h | ||
| irq.h | ||
| jbd.h | ||
| jbd2.h | ||
| kmem.h | ||
| kvm.h | ||
| lock.h | ||
| mce.h | ||
| module.h | ||
| napi.h | ||
| net.h | ||
| oom.h | ||
| power.h | ||
| rcu.h | ||
| regmap.h | ||
| regulator.h | ||
| rpm.h | ||
| sched.h | ||
| scsi.h | ||
| signal.h | ||
| skb.h | ||
| sock.h | ||
| syscalls.h | ||
| task.h | ||
| timer.h | ||
| udp.h | ||
| vmscan.h | ||
| workqueue.h | ||
| writeback.h | ||
| xen.h | ||