]> www.infradead.org Git - users/jedix/linux-maple.git/commit
block: Always check queue limits for cloned requests
authorHannes Reinecke <hare@suse.de>
Thu, 26 Nov 2015 07:46:57 +0000 (08:46 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 31 May 2016 00:11:40 +0000 (17:11 -0700)
commit1530fce0c4b21ec71c29750d78b17fbce7a82d10
treed5c55847ed51635167695f0091f011c4680ca890
parent7958dc35681b6ce10e6cceae9d9e6bbd1c86fb3e
block: Always check queue limits for cloned requests

When a cloned request is retried on other queues it always needs
to be checked against the queue limits of that queue.
Otherwise the calculations for nr_phys_segments might be wrong,
leading to a crash in scsi_init_sgtable().

To clarify this the patch renames blk_rq_check_limits()
to blk_cloned_rq_check_limits() and removes the symbol
export, as the new function should only be used for
cloned requests and never exported.

Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Ewan Milne <emilne@redhat.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Fixes: e2a60da74 ("block: Clean up special command handling logic")
Cc: stable@vger.kernel.org # 3.7+
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit bf4e6b4e757488dee1b6a581f49c7ac34cd217f8)

Orabug: 23140620
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
block/blk-core.c
include/linux/blkdev.h