linux/block
Joe Lawrence a492f07545 block,scsi: fixup blk_get_request dead queue scenarios
The blk_get_request function may fail in low-memory conditions or during
device removal (even if __GFP_WAIT is set). To distinguish between these
errors, modify the blk_get_request call stack to return the appropriate
ERR_PTR. Verify that all callers check the return status and consider
IS_ERR instead of a simple NULL pointer check.

For consistency, make a similar change to the blk_mq_alloc_request leg
of blk_get_request.  It may fail if the queue is dead, or the caller was
unwilling to wait.

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Jiri Kosina <jkosina@suse.cz> [for pktdvd]
Acked-by: Boaz Harrosh <bharrosh@panasas.com> [for osd]
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2014-08-28 10:03:46 -06:00
..
partitions partitions: aix.c: off by one bug 2014-08-05 13:13:24 -06:00
bio-integrity.c bio-integrity: add "bip_max_vcnt" into struct bio_integrity_payload 2014-07-01 10:36:47 -06:00
bio.c block: use kmalloc alignment for bio slab 2014-08-01 12:30:34 -04:00
blk-cgroup.c Merge branch 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2014-08-04 10:11:28 -07:00
blk-cgroup.h Revert "block: add __init to blkcg_policy_register" 2014-06-22 16:34:11 -06:00
blk-core.c block,scsi: fixup blk_get_request dead queue scenarios 2014-08-28 10:03:46 -06:00
blk-exec.c block: blk-exec.c: Cleaning up local variable address returnd 2014-06-08 19:51:31 -06:00
blk-flush.c block: remove elv_abort_queue and blk_abort_flushes 2014-06-11 15:31:21 -06:00
blk-integrity.c
blk-ioc.c
blk-iopoll.c Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
blk-lib.c
blk-map.c
blk-merge.c block: add support for limiting gaps in SG lists 2014-06-24 16:22:24 -06:00
blk-mq-cpu.c
blk-mq-cpumap.c
blk-mq-sysfs.c
blk-mq-tag.c blk-mq: bitmap tag: fix races in bt_get() function 2014-06-17 22:13:08 -07:00
blk-mq-tag.h blk-mq: bitmap tag: fix races on shared ::wake_index fields 2014-06-17 22:12:35 -07:00
blk-mq.c block,scsi: fixup blk_get_request dead queue scenarios 2014-08-28 10:03:46 -06:00
blk-mq.h blk-mq: decouble blk-mq freezing from generic bypassing 2014-07-01 10:31:13 -06:00
blk-settings.c block: ensure that bio_add_page() always accepts a page for an empty bio 2014-06-10 12:53:56 -06:00
blk-softirq.c
blk-sysfs.c block, blk-mq: draining can't be skipped even if bypass_depth was non-zero 2014-07-01 10:29:17 -06:00
blk-tag.c block: don't assume last put of shared tags is for the host 2014-07-08 12:25:28 +02:00
blk-throttle.c cgroup: remove sane_behavior support on non-default hierarchies 2014-07-09 10:08:08 -04:00
blk-timeout.c
blk.h block: remove elv_abort_queue and blk_abort_flushes 2014-06-11 15:31:21 -06:00
bounce.c mm: convert some level-less printks to pr_* 2014-06-06 16:08:18 -07:00
bsg-lib.c
bsg.c block,scsi: fixup blk_get_request dead queue scenarios 2014-08-28 10:03:46 -06:00
cfq-iosched.c Merge branch 'for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2014-06-09 15:03:33 -07:00
cmdline-parser.c
compat_ioctl.c Merge branch 'for-3.17/core' of git://git.kernel.dk/linux-block 2014-08-14 09:07:02 -06:00
deadline-iosched.c
elevator.c Revert "block: add __init to elv_register" 2014-06-22 16:34:11 -06:00
genhd.c
ioctl.c block: fix BLKSECTGET ioctl when max_sectors is greater than USHRT_MAX 2014-07-01 10:43:07 -06:00
ioprio.c
Kconfig
Kconfig.iosched
Makefile
noop-iosched.c
partition-generic.c
scsi_ioctl.c block,scsi: fixup blk_get_request dead queue scenarios 2014-08-28 10:03:46 -06:00