linux/drivers/block
Rafael Mendonca bff553de2c 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:02:54 +01:00
..
aoe
drbd
mtip32xx
null_blk
paride
rnbd
xen-blkback
zram
amiflop.c
ataflop.c
brd.c
floppy.c
Kconfig
loop.c
Makefile
n64cart.c
nbd.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd_types.h
rbd.c
sunvdc.c
swim_asm.S
swim.c
swim3.c
ublk_drv.c ublk: honor IO_URING_F_NONBLOCK for handling control command 2023-01-12 12:02:32 +01:00
virtio_blk.c virtio_blk: Fix signedness bug in virtblk_prep_rq() 2023-01-12 12:02:54 +01:00
xen-blkfront.c
z2ram.c