[PATCH v2 0/8] coverity fixes

Vladimir Sementsov-Ogievskiy posted 8 patches 7 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230926201532.221152-1-vsementsov@yandex-team.ru
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Peter Xu <peterx@redhat.com>, Jason Wang <jasowang@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Daniel P. Berrangé" <berrange@redhat.com>
There is a newer version of this series
block/nvme.c                              |  7 ++++---
hw/core/loader.c                          |  2 +-
hw/i386/intel_iommu.c                     | 23 ++++++++++++++++++---
hw/pci/pcie_sriov.c                       |  9 +++-----
hw/rtc/mc146818rtc.c                      |  2 +-
io/channel-socket.c                       |  5 +++++
subprojects/libvhost-user/libvhost-user.c |  1 +
util/filemonitor-inotify.c                | 25 +++++++++++++++--------
8 files changed, 52 insertions(+), 22 deletions(-)
[PATCH v2 0/8] coverity fixes
Posted by Vladimir Sementsov-Ogievskiy 7 months, 1 week ago
v2:
01: add explanations, new assert and avoid extra assignment
    add CIDs [thx to Paolo]
02: add explanation, improve wording
04,07: s/{0}/{}
06,08: improve wording

Hi! Here are some improvements to handle issues found by Coverity (not
public Coverity site, so there are no CIDs).

Vladimir Sementsov-Ogievskiy (8):
  hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow
  util/filemonitor-inotify: qemu_file_monitor_watch(): assert no
    overflow
  libvhost-user.c: add assertion to vu_message_read_default
  mc146818rtc: rtc_set_time(): initialize tm to zeroes
  pcie_sriov: unregister_vfs(): fix error path
  block/nvme: nvme_process_completion() fix bound for cid
  hw/core/loader: gunzip(): initialize z_stream
  io/channel-socket: qio_channel_socket_flush(): improve msg validation

 block/nvme.c                              |  7 ++++---
 hw/core/loader.c                          |  2 +-
 hw/i386/intel_iommu.c                     | 23 ++++++++++++++++++---
 hw/pci/pcie_sriov.c                       |  9 +++-----
 hw/rtc/mc146818rtc.c                      |  2 +-
 io/channel-socket.c                       |  5 +++++
 subprojects/libvhost-user/libvhost-user.c |  1 +
 util/filemonitor-inotify.c                | 25 +++++++++++++++--------
 8 files changed, 52 insertions(+), 22 deletions(-)

-- 
2.34.1
Re: [PATCH v2 0/8] coverity fixes
Posted by Maksim Davydov 7 months, 1 week ago
On 9/26/23 23:15, Vladimir Sementsov-Ogievskiy wrote:
> v2:
> 01: add explanations, new assert and avoid extra assignment
>      add CIDs [thx to Paolo]
> 02: add explanation, improve wording
> 04,07: s/{0}/{}
> 06,08: improve wording
>
> Hi! Here are some improvements to handle issues found by Coverity (not
> public Coverity site, so there are no CIDs).
>
> Vladimir Sementsov-Ogievskiy (8):
>    hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow
>    util/filemonitor-inotify: qemu_file_monitor_watch(): assert no
>      overflow
>    libvhost-user.c: add assertion to vu_message_read_default
>    mc146818rtc: rtc_set_time(): initialize tm to zeroes
>    pcie_sriov: unregister_vfs(): fix error path
>    block/nvme: nvme_process_completion() fix bound for cid
>    hw/core/loader: gunzip(): initialize z_stream
>    io/channel-socket: qio_channel_socket_flush(): improve msg validation
>
>   block/nvme.c                              |  7 ++++---
>   hw/core/loader.c                          |  2 +-
>   hw/i386/intel_iommu.c                     | 23 ++++++++++++++++++---
>   hw/pci/pcie_sriov.c                       |  9 +++-----
>   hw/rtc/mc146818rtc.c                      |  2 +-
>   io/channel-socket.c                       |  5 +++++
>   subprojects/libvhost-user/libvhost-user.c |  1 +
>   util/filemonitor-inotify.c                | 25 +++++++++++++++--------
>   8 files changed, 52 insertions(+), 22 deletions(-)
>
all patches:
Reviewed-by: Maksim Davydov <davydov-max@yandex-team.ru>