block,scsi: verify return pointer from blk_get_request
authorJoe Lawrence <joe.lawrence@stratus.com>
Wed, 2 Jul 2014 19:35:16 +0000 (15:35 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 26 Aug 2014 21:20:23 +0000 (15:20 -0600)
commiteb571eeade2598635f813b3284d02c13a380301e
tree539842ad23a4eaae8c272278fd9fea389afa6b93
parent52addcf9d6669fa439387610bc65c92fa0980cef
block,scsi: verify return pointer from blk_get_request

The blk-core dead queue checks introduce an error scenario to
blk_get_request that returns NULL if the request queue has been
shutdown. This affects the behavior for __GFP_WAIT callers, who should
verify the return value before dereferencing.

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Jiri Kosina <jkosina@suse.cz> [for pktdvd]
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/scsi_ioctl.c
drivers/block/paride/pd.c
drivers/block/pktcdvd.c
drivers/scsi/scsi_error.c