qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bdrv_pad_request() Coverity report


From: Stefan Hajnoczi
Subject: bdrv_pad_request() Coverity report
Date: Wed, 27 Mar 2024 15:17:04 -0400

Hi Fiona,
The Coverity static checker sent a report about commit 3f934817c82c
("block/io: accept NULL qiov in bdrv_pad_request").

Please take a look and send a follow-up patch, if necessary:

*** CID 1542668:  Null pointer dereferences  (REVERSE_INULL)
/builds/qemu-project/qemu/bloc
k/io.c: 1733 in bdrv_pad_request()
1727         }
1728
1729         /*
1730          * For prefetching in stream_populate(), no qiov is
passed along, because
1731          * only copy-on-read matters.
1732          */
>>>     CID 1542668:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "qiov" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
1733         if (qiov && *qiov) {
1734             sliced_iov = qemu_iovec_slice(*qiov, *qiov_offset, *bytes,
1735                                           &sliced_head, &sliced_tail,
1736                                           &sliced_niov);
1737
1738             /* Guaranteed by bdrv_check_request32() */

Thanks,
Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]