android_kernel_xiaomi_sm7250/block
Jens Axboe 62c1fe9d9f cfq-iosched: fix race between exiting queue and exiting task
Original patch from Nikanth Karthikesan <knikanth@suse.de>

When a queue exits the queue lock is taken and cfq_exit_queue() would free all
the cic's associated with the queue.

But when a task exits, cfq_exit_io_context() gets cic one by one and then
locks the associated queue to call __cfq_exit_single_io_context. It looks like
between getting a cic from the ioc and locking the queue, the queue might have
exited on another cpu.

Fix this by rechecking the cfq_io_context queue key inside the queue lock
again, and not calling into __cfq_exit_single_io_context() if somebody
beat us to it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-12-29 08:29:52 +01:00
..
as-iosched.c
blk-barrier.c
blk-core.c
blk-exec.c
blk-integrity.c
blk-ioc.c
blk-map.c
blk-merge.c
blk-settings.c
blk-softirq.c
blk-sysfs.c
blk-tag.c
blk-timeout.c
blk.h
blktrace.c
bsg.c
cfq-iosched.c cfq-iosched: fix race between exiting queue and exiting task 2008-12-29 08:29:52 +01:00
cmd-filter.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c
ioctl.c
Kconfig
Kconfig.iosched
Makefile
noop-iosched.c
scsi_ioctl.c