diff options
author | Alexander Gordeev | 2014-06-17 22:37:23 +0200 |
---|---|---|
committer | Jens Axboe | 2014-06-18 07:13:08 +0200 |
commit | 86fb5c56cfa26de5e91c9a50e2767a695dff366e (patch) | |
tree | da76443281fb15c54d56400b25ff9279e0b9e33e /Documentation/hwmon/ltc4245 | |
parent | blk-mq: bitmap tag: fix race on blk_mq_bitmap_tags::wake_cnt (diff) | |
download | kernel-qcow2-linux-86fb5c56cfa26de5e91c9a50e2767a695dff366e.tar.gz kernel-qcow2-linux-86fb5c56cfa26de5e91c9a50e2767a695dff366e.tar.xz kernel-qcow2-linux-86fb5c56cfa26de5e91c9a50e2767a695dff366e.zip |
blk-mq: bitmap tag: fix races in bt_get() function
This update fixes few issues in bt_get() function:
- list_empty(&wait.task_list) check is not protected;
- was_empty check is always true which results in *every* thread
entering the loop resets bt_wait_state::wait_cnt counter rather
than every bt->wake_cnt'th thread;
- 'bt_wait_state::wait_cnt' counter update is redundant, since
it also gets reset in bt_clear_tag() function;
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'Documentation/hwmon/ltc4245')
0 files changed, 0 insertions, 0 deletions