summaryrefslogtreecommitdiffstats
path: root/kernel/lglock.c
diff options
context:
space:
mode:
authorDerek Basehore2012-12-18 21:27:20 +0100
committerJens Axboe2012-12-19 20:36:10 +0100
commit12c2bdb232168511c8dd54d6626549391a228918 (patch)
tree8b9179df57d7ddd596a57d465cce4e0949795d25 /kernel/lglock.c
parentblock: remove deadlock in disk_clear_events (diff)
downloadkernel-qcow2-linux-12c2bdb232168511c8dd54d6626549391a228918.tar.gz
kernel-qcow2-linux-12c2bdb232168511c8dd54d6626549391a228918.tar.xz
kernel-qcow2-linux-12c2bdb232168511c8dd54d6626549391a228918.zip
block: prevent race/cleanup
Remove a race condition which causes a warning in disk_clear_events. This is a race between disk_clear_events() and disk_flush_events(). ev->clearing will be altered by disk_flush_events() even though we are blocking event checking through disk_flush_events(). If this happens after ev->clearing was cleared for disk_clear_events(), this can cause the WARN_ON_ONCE() in that function to be triggered. This change also has disk_clear_events() not go through a workqueue. Since we have to wait for the work to complete, we should just call the function directly. Also, since this work cannot be put on a freezable workqueue, it will have to contend with increased demand, so calling the function directly avoids this. [akpm@linux-foundation.org: fix spello in comment] Signed-off-by: Derek Basehore <dbasehore@chromium.org> Cc: Mandeep Singh Baines <msb@chromium.org> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/lglock.c')
0 files changed, 0 insertions, 0 deletions