[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220711090608.997252359@linuxfoundation.org>
Date: Mon, 11 Jul 2022 11:07:10 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Zeal Robot <zealci@....com.cn>,
Ye Guojin <ye.guojin@....com.cn>,
"Michael S. Tsirkin" <mst@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>,
Max Gurtovoy <mgurtovoy@...dia.com>,
Stefan Hajnoczi <stefanha@...hat.com>
Subject: [PATCH 5.15 174/230] virtio-blk: modify the value type of num in virtio_queue_rq()
From: Ye Guojin <ye.guojin@....com.cn>
commit 0466a39bd0b6c462338f10d18076703d14a552de upstream.
This was found by coccicheck:
./drivers/block/virtio_blk.c, 334, 14-17, WARNING Unsigned expression
compared with zero num < 0
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Ye Guojin <ye.guojin@....com.cn>
Link: https://lore.kernel.org/r/20211117063955.160777-1-ye.guojin@zte.com.cn
Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
Fixes: 02746e26c39e ("virtio-blk: avoid preallocating big SGL for data")
Reviewed-by: Stefano Garzarella <sgarzare@...hat.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@...dia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/block/virtio_blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -308,7 +308,7 @@ static blk_status_t virtio_queue_rq(stru
struct request *req = bd->rq;
struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
unsigned long flags;
- unsigned int num;
+ int num;
int qid = hctx->queue_num;
int err;
bool notify = false;
Powered by blists - more mailing lists