linux/include
Ming Lei 2d87d455ea blk-mq: don't add non-pt request with ->end_io to batch
dm-rq implements ->end_io callback for request issued to underlying queue,
and it isn't passthrough request.

Commit ab3e1d3bba ("block: allow end_io based requests in the completion
batch handling") doesn't clear rq->bio and rq->__data_len for request
with ->end_io in blk_mq_end_request_batch(), and this way is actually
dangerous, but so far it is only for nvme passthrough request.

dm-rq needs to clean up remained bios in case of partial completion,
and req->bio is required, then use-after-free is triggered, so the
underlying clone request can't be completed in blk_mq_end_request_batch.

Fix panic by not adding such request into batch list, and the issue
can be triggered simply by exposing nvme pci to dm-mpath simply.

Fixes: ab3e1d3bba ("block: allow end_io based requests in the completion batch handling")
Cc: dm-devel@redhat.com
Cc: Mike Snitzer <snitzer@kernel.org>
Reported-by: Changhui Zhong <czhong@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20221027085709.513175-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-10-27 07:15:44 -06:00
..
acpi platform-drivers-x86 for v6.1-1 2022-10-05 10:38:24 -07:00
asm-generic powerpc updates for 6.1 2022-10-09 14:05:15 -07:00
clocksource
crypto
drm Driver core changes for 6.1-rc1 2022-10-07 17:04:10 -07:00
dt-bindings Here's the main clk pull request for this merge window. We have some 2022-10-08 10:06:48 -07:00
keys
kunit kunit: no longer call module_info(test, "Y") for kunit modules 2022-09-30 13:17:49 -06:00
kvm
linux blk-mq: don't add non-pt request with ->end_io to batch 2022-10-27 07:15:44 -06:00
math-emu powerpc/math-emu: Remove -w build flag and fix warnings 2022-09-05 17:28:25 +10:00
media USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-03 17:44:18 -07:00
pcmcia
ras
rdma RDMA/core: Add UVERBS_ATTR_RAW_FD 2022-09-27 10:15:24 -03:00
rv
scsi SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
soc Here's the main clk pull request for this merge window. We have some 2022-10-08 10:06:48 -07:00
sound ASoC: Updates for v6.1 2022-10-03 16:30:42 +02:00
target
trace Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
uapi Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
ufs SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
vdso
video
xen