linux/block
Christoph Hellwig df308a1458 block: fix aligning of bounced dio read bios
bio_iov_iter_align_down expects the "normal" biovec layout from vector 0,
while bio_iov_iter_bounce_read abuses vector 0 for a bounce buffer
allocation.  Pass an explicit bvec to bio_iov_iter_align_down to deal
with this case to avoid a double unpin.

Additionally we need to free the folio if no bio_vec could be added,
and adjust the size of the first bio_vec that contains the bounce buffer
when the I/O size is aligned down.

Fixes: e7b8b3c5b2 ("block: align down bounces bios")
Reported-by: 0wnerD1ed <l7z@0b1t.tech>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: 0wnerD1ed <l7z@0b1t.tech>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://patch.msgid.link/20260716091306.316625-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-07-16 06:11:37 -06:00
..
partitions partitions: aix: bound the lvd scan to one sector 2026-07-15 16:32:49 -06:00
badblocks.c badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0 2025-03-10 07:41:58 -06:00
bdev.c block: Avoid mounting the bdev pseudo-filesystem in userspace 2026-05-26 11:01:55 -06:00
bfq-cgroup.c blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
bfq-iosched.c block, bfq: don't grab queue_lock to initialize bfq 2026-06-24 06:42:31 -06:00
bfq-iosched.h block, bfq: update outdated comment 2026-01-01 08:57:37 -07:00
bfq-wf2q.c
bio-integrity-auto.c block: fix GFP_ flags confusion in bio_integrity_alloc_buf 2026-06-24 06:53:25 -06:00
bio-integrity-fs.c block: fix GFP_ flags confusion in bio_integrity_alloc_buf 2026-06-24 06:53:25 -06:00
bio-integrity.c block: handle REQ_OP_ZONE_APPEND in __bio_integrity_action 2026-06-24 06:53:25 -06:00
bio.c block: fix aligning of bounced dio read bios 2026-07-16 06:11:37 -06:00
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
blk-cgroup-rwstat.h
blk-cgroup.c blk-cgroup: fix leaks and online flag on radix_tree_insert failure 2026-07-15 16:31:43 -06:00
blk-cgroup.h blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
blk-core.c block: Remove redundant plug in __submit_bio() 2026-06-16 10:06:27 -06:00
blk-crypto-fallback.c for-7.2/block-20260615 2026-06-16 13:02:47 +05:30
blk-crypto-internal.h blk-crypto: handle the fallback above the block layer 2026-01-11 12:55:41 -07:00
blk-crypto-profile.c block/crypto: Annotate the crypto functions 2026-06-05 13:41:11 -06:00
blk-crypto-sysfs.c blk-crypto: make blk_crypto_attr instances const 2026-03-17 19:29:16 -06:00
blk-crypto.c - small cleanups in dm-vdo, dm-raid, dm-cache, dm-zoned-metadata 2026-06-16 13:20:54 +05:30
blk-flush.c block: pass io_comp_batch to rq_end_io_fn callback 2026-01-20 10:12:54 -07:00
blk-ia-ranges.c block: ia-ranges: make blk_ia_range_sysfs_entry instances const 2026-03-17 19:29:16 -06:00
blk-integrity.c block: don't merge bios with different app_tags 2026-01-06 19:10:08 -07:00
blk-ioc.c copy_process: pass clone_flags as u64 across calltree 2025-09-01 15:31:34 +02:00
blk-iocost.c blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
blk-iolatency.c blk-cgroup: delay freeing policy data after rcu grace period 2026-06-24 06:37:54 -06:00
blk-ioprio.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
blk-ioprio.h
blk-lib.c block: add a bio_submit_or_kill helper 2026-04-07 08:22:24 -06:00
blk-map.c block: free copied pages when blk_rq_map_kern() fails 2026-07-16 06:08:14 -06:00
blk-merge.c block: propagate in_flight to whole disk on partition I/O 2026-06-09 10:12:50 -06:00
blk-mq-cpumap.c blk-mq: add number of queue calc helper 2025-07-01 10:24:19 -06:00
blk-mq-debugfs.c block/blk-mq-debugfs: Improve lock context annotations 2026-06-05 13:41:11 -06:00
blk-mq-debugfs.h blk-mq-debugfs: remove blk_mq_debugfs_unregister_rqos() 2026-02-02 07:05:19 -07:00
blk-mq-dma.c block: fix partial IOVA mapping cleanup in blk_rq_dma_map_iova 2026-02-12 04:23:31 -07:00
blk-mq-sched.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
blk-mq-sched.h blk-mq-sched: unify elevators checking for async requests 2026-02-03 07:45:36 -07:00
blk-mq-sysfs.c blk-mq: make blk_mq_hw_ctx_sysfs_entry instances const 2026-03-17 19:29:16 -06:00
blk-mq-tag.c blk-mq: add tracepoint block_rq_tag_wait 2026-05-26 11:01:54 -06:00
blk-mq.c blk-mq: bound blk_hctx_poll() to one jiffy 2026-06-26 10:41:33 -06:00
blk-mq.h blk-mq: use queue_hctx in blk_mq_map_queue_type 2025-12-01 07:18:31 -07:00
blk-pm.c block: force noio scope in blk_mq_freeze_queue 2025-01-31 07:20:08 -07:00
blk-pm.h
blk-rq-qos.c blk-mq-debugfs: remove blk_mq_debugfs_unregister_rqos() 2026-02-02 07:05:19 -07:00
blk-rq-qos.h blk-rq-qos: Remove unlikely() hints from QoS checks 2026-01-06 19:08:23 -07:00
blk-settings.c block: clear BLK_FEAT_PCI_P2PDMA in blk_stack_limits() for non-supporting devices 2026-05-26 15:51:48 -06:00
blk-stat.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
blk-stat.h blk-stat: convert struct blk_stat_callback to kernel-doc 2026-02-16 10:21:06 -07:00
blk-sysfs.c block: add configurable error injection 2026-06-12 10:40:35 -06:00
blk-throttle.c blk-cgroup: delay freeing policy data after rcu grace period 2026-06-24 06:37:54 -06:00
blk-throttle.h blk-throttle: fix access race during throttle policy activation 2025-09-08 08:24:44 -06:00
blk-timeout.c
blk-wbt.c block: Make WBT latency writes honor enable state 2026-07-01 19:07:20 -06:00
blk-wbt.h blk-wbt: factor out a helper wbt_set_lat() 2026-02-02 07:05:19 -07:00
blk-zoned.c block: avoid potential deadlock on zone revalidation failure 2026-07-01 05:34:35 -06:00
blk.h block: fix race in blk_time_get_ns() returning 0 2026-07-15 16:31:05 -06:00
bsg-lib.c block: switch numa_node to int in blk_mq_hw_ctx and init_request 2026-05-26 11:01:55 -06:00
bsg.c bsg: add io_uring command support to generic layer 2026-03-19 11:38:24 -06:00
disk-events.c loop: fix partition scan race between udev and loop_reread_partitions() 2026-03-31 07:04:34 -06:00
early-lookup.c
elevator.c block: serialize elevator changes for the same queue using a writer lock 2026-07-16 06:08:38 -06:00
elevator.h block: fix race between wbt_enable_default and IO submission 2025-12-12 12:51:11 -07:00
error-injection.c block: show operation in error injection rules 2026-07-16 06:08:55 -06:00
error-injection.h block: add configurable error injection 2026-06-12 10:40:35 -06:00
fops.c block: add a bio_endio_status helper 2026-05-28 07:59:18 -06:00
genhd.c block: remove redundant GD_NEED_PART_SCAN in add_disk_final() 2026-07-10 09:08:50 -06:00
holder.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ioctl.c block: fix IORING_URING_CMD_REISSUE flags check in blkdev_uring_cmd 2026-06-16 09:56:38 -06:00
ioprio.c block: remove test of incorrect io priority level 2025-05-08 09:04:12 -06:00
Kconfig block: add configurable error injection 2026-06-12 10:40:35 -06:00
Kconfig.iosched
kyber-iosched.c block/Kyber: Make the lock context annotations compatible with Clang 2026-06-05 13:41:11 -06:00
Makefile block: add configurable error injection 2026-06-12 10:40:35 -06:00
mq-deadline.c block/mq-deadline: Make the lock context annotations compatible with Clang 2026-06-05 13:41:11 -06:00
opal_proto.h sed-opal: Add STACK_RESET command 2026-03-31 07:04:00 -06:00
sed-opal.c sed-opal: Add STACK_RESET command 2026-03-31 07:04:00 -06:00
t10-pi.c blk-integrity: support arbitrary buffer alignment 2026-03-14 07:44:30 -06:00