summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-04-09 14:33:51 +1000
committerNeilBrown <neilb@suse.de>2014-04-09 14:42:34 +1000
commite2f23b606b94f28a8febd5aa715df697d80b018e (patch)
treed9f21bd649683bedbdadb301b1533c09e13591ba /block
parentda1aab3dca9aa88ae34ca392470b8943159e25fe (diff)
downloadop-kernel-dev-e2f23b606b94f28a8febd5aa715df697d80b018e.zip
op-kernel-dev-e2f23b606b94f28a8febd5aa715df697d80b018e.tar.gz
md: avoid oops on unload if some process is in poll or select.
If md-mod is unloaded while some process is in poll() or select(), then that process maintains a pointer to md_event_waiters, and when the try to unlink from that list, they will oops. The procfs infrastructure ensures that ->poll won't be called after remove_proc_entry, but doesn't provide a wait_queue_head for us to use, and the waitqueue code doesn't provide a way to remove all listeners from a waitqueue. So we need to: 1/ make sure no further references to md_event_waiters are taken (by setting md_unloading) 2/ wake up all processes currently waiting, and 3/ wait until all those processes have disconnected from our wait_queue_head. Reported-by: "majianpeng" <majianpeng@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud