diff options
author | Derek Basehore <dbasehore@chromium.org> | 2012-12-18 12:27:20 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-12-19 20:36:10 +0100 |
commit | 12c2bdb232168511c8dd54d6626549391a228918 (patch) | |
tree | 8b9179df57d7ddd596a57d465cce4e0949795d25 /drivers/block/xen-blkback | |
parent | aea24a8bbc81c8b404e4e293fb37aefaf388d35d (diff) | |
download | op-kernel-dev-12c2bdb232168511c8dd54d6626549391a228918.zip op-kernel-dev-12c2bdb232168511c8dd54d6626549391a228918.tar.gz |
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 'drivers/block/xen-blkback')
0 files changed, 0 insertions, 0 deletions