linux-hardened/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 s390/partitions: make partition detection independent from DASD ioctls 2012-09-26 15:45:05 +02:00
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 blkcg: implement per-blkg request allocation 2012-06-26 18:42:49 -04:00
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-flush: move the queue kick into 2011-10-24 16:24:31 +02:00
blk-integrity.c block: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros 2011-10-31 19:31:12 -04:00
blk-ioc.c block: uninitialized ioc->nr_tasks triggers WARN_ON 2012-08-01 12:17:27 +02:00
blk-iopoll.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
blk-lib.c block: Make blkdev_issue_zeroout use WRITE SAME 2012-09-20 14:31:49 +02:00
blk-map.c block: re-use existing 'reading' variable instead of checking direction again 2011-12-21 15:27:24 +01:00
blk-merge.c block: Implement support for WRITE SAME 2012-09-20 14:31:45 +02:00
blk-settings.c block: Implement support for WRITE SAME 2012-09-20 14:31:45 +02:00
blk-softirq.c sched, block: Unify cache detection 2012-01-27 13:28:48 +01:00
blk-sysfs.c block: lift the initial queue bypass mode on blk_register_queue() instead of blk_init_allocated_queue() 2012-09-21 15:32:57 +02:00
blk-tag.c block/blk-tag.c: Remove useless kfree 2012-09-12 22:25:12 +02:00
blk-throttle.c workqueue: use mod_delayed_work() instead of __cancel + queue 2012-08-21 13:18:24 -07:00
blk-timeout.c block: Drop dead function blk_abort_queue() 2012-06-15 08:46:23 +02:00
blk.h block: Clean up special command handling logic 2012-09-20 14:31:38 +02:00
bsg-lib.c block: drop custom queue draining used by scsi_transport_{iscsi|fc} 2012-06-25 11:53:48 +02:00
bsg.c bsg: fix sysfs link remove warning 2012-02-08 20:02:03 +01:00
cfq-iosched.c block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED 2012-06-04 10:02:29 +02:00
compat_ioctl.c block: Add BLKROTATIONAL ioctl 2012-01-11 16:29:31 +01:00
deadline-iosched.c elevator: make elevator_init_fn() return 0/-errno 2012-03-06 21:27:21 +01:00
elevator.c block: Clean up special command handling logic 2012-09-20 14:31:38 +02:00
genhd.c Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
ioctl.c Merge branch 'for-3.7/core' of git://git.kernel.dk/linux-block 2012-10-11 09:04:23 +09:00
Kconfig block: remove CONFIG_EXPERIMENTAL 2012-10-23 22:30:34 +02:00
Kconfig.iosched blkcg: make CONFIG_BLK_CGROUP bool 2012-03-06 21:27:21 +01:00
Makefile separate partition format handling from generic code 2012-01-03 22:54:06 -05:00
noop-iosched.c elevator: make elevator_init_fn() return 0/-errno 2012-03-06 21:27:21 +01:00
partition-generic.c block: add partition resize function to blkpg ioctl 2012-08-01 12:24:18 +02:00
scsi_ioctl.c scsi: Silence unnecessary warnings about ioctl to partition 2012-06-15 12:52:46 +02:00