linux-stable/drivers/block
Rafael Mendonca 9f1490d9fd virtio_blk: Fix signedness bug in virtblk_prep_rq()
[ Upstream commit a26116c1e7 ]

The virtblk_map_data() function returns negative error codes, however, the
'nents' field of vbr->sg_table is an unsigned int, which causes the error
handling not to work correctly.

Cc: stable@vger.kernel.org
Fixes: 0e9911fa76 ("virtio-blk: support mq_ops->queue_rqs()")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Message-Id: <20221021204126.927603-1-rafaelmendsr@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Suwan Kim <suwan.kim027@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-12 12:00:47 +01:00
..
aoe block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
drbd drbd: destroy workqueue when drbd device was freed 2022-12-31 13:26:02 +01:00
mtip32xx blk-mq: Drop 'reserved' arg of busy_tag_iter_fn 2022-07-06 06:33:53 -06:00
null_blk null_blk: fix ida error handling in null_add_dev() 2022-08-02 17:22:41 -06:00
paride block: Change the type of req_op() and bio_op() into enum req_op 2022-07-14 12:14:30 -06:00
rnbd block/rnbd-srv: Replace sess_dev_list with index_idr 2022-08-02 17:14:50 -06:00
xen-blkback xen: branch for v6.0-rc4 2022-09-03 13:23:11 -07:00
zram Revert "zram: remove double compression logic" 2022-08-20 15:17:44 -07:00
Kconfig remove the sx8 block driver 2022-08-02 17:22:46 -06:00
Makefile remove the sx8 block driver 2022-08-02 17:22:46 -06:00
amiflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ataflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
brd.c block/brd: Use the enum req_op type 2022-07-14 12:14:31 -06:00
floppy.c floppy: Fix memory leak in do_floppy_init() 2022-12-31 13:26:52 +01:00
loop.c loop: Fix the max_loop commandline argument treatment when it is set to 0 2022-12-31 13:26:52 +01:00
n64cart.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
nbd.c nbd: Fix hung when signal interrupts nbd_start_device_ioctl() 2022-10-21 12:39:21 +02:00
pktcdvd.c block: change the blk_queue_split calling convention 2022-08-02 17:22:53 -06:00
ps3disk.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ps3vram.c block: change the blk_queue_split calling convention 2022-08-02 17:22:53 -06:00
rbd.c We have a good pile of various fixes and cleanups from Xiubo, Jeff, 2022-08-11 12:41:07 -07:00
rbd_types.h
sunvdc.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim3.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim_asm.S
ublk_drv.c ublk: honor IO_URING_F_NONBLOCK for handling control command 2023-01-12 12:00:41 +01:00
virtio_blk.c virtio_blk: Fix signedness bug in virtblk_prep_rq() 2023-01-12 12:00:47 +01:00
xen-blkfront.c xen: branch for v6.0-rc4 2022-09-03 13:23:11 -07:00
z2ram.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00