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.
Showing the changes to include/linux/blkdev.h (1 of 2 files). Show all
Unified · Split
| @@ -773,7 +773,6 @@ extern void blk_rq_set_block_pc(struct request *); · 772 unmodified lines | ||
| 773 | 773 | extern void blk_requeue_request(struct request_queue *, struct request *); |
| 774 | 774 | extern void blk_add_request_payload(struct request *rq, struct page *page, |
| 775 | 775 | unsigned int len); |
| 776 | −extern int blk_rq_check_limits(struct request_queue *q, struct request *rq); | |
| 777 | 776 | extern int blk_lld_busy(struct request_queue *q); |
| 778 | 777 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, |
| 779 | 778 | struct bio_set *bs, gfp_t gfp_mask, |