linux/drivers/block
Damien Le Moal aacae8c469 block: null_blk: Fix null_zone_write()
The bio and rq fields of struct nullb_cmd are now overlapping in a
union. So we cannot use a test on ->bio being non-NULL to detect the
NULL_Q_BIO queue mode. null_zone_write() use such broken test to set the
sector position of a zone append write in the command bio or request.
When the null_blk device uses the NULL_Q_MQ queue mode,
null_zone_write() wrongly end up setting the bio sector position,
resulting in the command request to be broken and random crashes
following.

Fix this by testing the device queue mode directly.

Fixes: 8ba816b23a ("null-blk: save memory footprint for struct nullb_cmd")
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220602120344.1365329-1-damien.lemoal@opensource.wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-06-02 07:11:28 -06:00
..
aoe aoe: Avoid flush_scheduled_work() usage 2022-05-01 06:41:41 -06:00
drbd drbd: Return true/false (not 1/0) from bool functions 2022-04-17 19:54:24 -06:00
mtip32xx mtip32xx: fix typo in comment 2022-05-21 06:32:27 -06:00
null_blk block: null_blk: Fix null_zone_write() 2022-06-02 07:11:28 -06:00
paride Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
rnbd rnbd-srv: use bdev_discard_alignment 2022-05-03 10:38:50 -06:00
xen-blkback xen-blkback: use bdev_discard_alignment 2022-05-04 05:24:40 -06:00
zram block: add a disk_openers helper 2022-04-18 06:54:09 -06:00
amiflop.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
ataflop.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
brd.c brd: remove brd_devices_mutex mutex 2022-01-17 07:19:40 -07:00
floppy.c floppy: use memcpy_{to,from}_bvec 2022-03-04 12:29:21 -07:00
Kconfig block: remove the rsxx driver 2021-12-16 10:57:04 -07:00
loop.c block, loop: support partitions without scanning 2022-05-27 06:39:00 -06:00
Makefile block: remove the rsxx driver 2021-12-16 10:57:04 -07:00
n64cart.c n64cart: convert bi_disk to bi_bdev->bd_disk fix build 2022-03-21 06:34:45 -06:00
nbd.c nbd: use pr_err to output error message 2022-05-27 20:39:33 -06:00
pktcdvd.c pktcdvd: stop using bio_reset 2022-04-17 19:30:47 -06:00
ps3disk.c ps3disk: add error handling support for add_disk() 2021-10-30 11:03:37 -06:00
ps3vram.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
rbd_types.h libceph, rbd: replace zero-length array with flexible-array 2020-06-01 13:22:53 +02:00
rbd.c block: remove QUEUE_FLAG_DISCARD 2022-04-17 19:49:59 -06:00
sunvdc.c block: remove genhd.h 2022-02-02 07:49:59 -07:00
swim3.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
swim_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
swim.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
sx8.c block: remove the gendisk argument to blk_execute_rq 2021-11-29 06:41:29 -07:00
virtio_blk.c virtio_blk: fix the discard_granularity and discard_alignment queue limits 2022-05-03 10:38:50 -06:00
xen-blkfront.c block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD 2022-04-17 19:49:59 -06:00
z2ram.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00