android_kernel_samsung_msm8976/block
Roland Dreier 893d290f1d block: Don't access request after it might be freed
After we've done __elv_add_request() and __blk_run_queue() in
blk_execute_rq_nowait(), the request might finish and be freed
immediately.  Therefore checking if the type is REQ_TYPE_PM_RESUME
isn't safe afterwards, because if it isn't, rq might be gone.
Instead, check beforehand and stash the result in a temporary.

This fixes crashes in blk_execute_rq_nowait() I get occasionally when
running with lots of memory debugging options enabled -- I think this
race is usually harmless because the window for rq to be reallocated
is so small.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-11-23 14:32:55 +01:00
..
partitions
blk-cgroup.c blkcg: stop iteration early if root_rl is the only request list 2012-10-22 22:00:26 +02:00
blk-cgroup.h
blk-core.c block: Add blk_rq_pos(rq) to sort rq when plushing 2012-10-25 21:58:17 +02:00
blk-exec.c block: Don't access request after it might be freed 2012-11-23 14:32:55 +01:00
blk-flush.c
blk-integrity.c
blk-ioc.c
blk-iopoll.c
blk-lib.c
blk-map.c
blk-merge.c
blk-settings.c
blk-softirq.c
blk-sysfs.c
blk-tag.c
blk-throttle.c
blk-timeout.c
blk.h
bsg-lib.c
bsg.c
cfq-iosched.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c
ioctl.c
Kconfig block: remove CONFIG_EXPERIMENTAL 2012-10-23 22:30:34 +02:00
Kconfig.iosched
Makefile
noop-iosched.c
partition-generic.c
scsi_ioctl.c