linux-uconsole/include
Jan Kara bf0972039d bdi: avoid oops on device removal
commit 5acda9d12d upstream.

After commit 839a8e8660 ("writeback: replace custom worker pool
implementation with unbound workqueue") when device is removed while we
are writing to it we crash in bdi_writeback_workfn() ->
set_worker_desc() because bdi->dev is NULL.

This can happen because even though bdi_unregister() cancels all pending
flushing work, nothing really prevents new ones from being queued from
balance_dirty_pages() or other places.

Fix the problem by clearing BDI_registered bit in bdi_unregister() and
checking it before scheduling of any flushing work.

Fixes: 839a8e8660

Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Derek Basehore <dbasehore@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 17:15:35 -07:00
..
acpi
asm-generic
clocksource clocksource: arch_timer: use virtual counters 2014-01-09 12:24:26 -08:00
crypto
drm
dt-bindings
keys
linux bdi: avoid oops on device removal 2014-04-26 17:15:35 -07:00
math-emu
media
memory
misc
net tcp: tcp_release_cb() should release socket ownership 2014-04-14 06:42:16 -07:00
pcmcia
ras
rdma
rxrpc
scsi ore: Fix wrong math in allocation of per device BIO 2014-02-13 13:48:00 -08:00
sound
target iscsi/iser-target: Fix isert_conn->state hung shutdown issues 2014-03-23 21:38:21 -07:00
trace tracing: Fix array size mismatch in format string 2014-03-31 09:58:12 -07:00
uapi
video
xen
Kbuild