[PATCH 0/4] Fix error handling for callers of

Trieu Huynh posted 4 patches 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260310182801.196443-1-viking4@gmail.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>, Corey Minyard <minyard@acm.org>, Thomas Huth <th.huth+qemu@posteo.eu>, Laurent Vivier <laurent@vivier.eu>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>, Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>, Jason Wang <jasowang@redhat.com>, Jiri Pirko <jiri@resnulli.us>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, BALATON Zoltan <balaton@eik.bme.hu>, Bernhard Beschow <shentey@gmail.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Nicholas Piggin <npiggin@gmail.com>, Aditya Gupta <adityag@linux.ibm.com>, Glenn Miles <milesg@linux.ibm.com>, "Hervé Poussineau" <hpoussin@reactos.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Jagannathan Raman <jag.raman@oracle.com>, Hannes Reinecke <hare@suse.com>, Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, "Clément Chigot" <chigot@adacore.com>, Frederic Konrad <konrad.frederic@yahoo.fr>, Artyom Tarasenko <atar4qemu@gmail.com>, Tony Krowiak <akrowiak@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Jason Herne <jjherne@linux.ibm.com>, Alex Williamson <alex@shazbot.org>, "Cédric Le Goater" <clg@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Stefano Garzarella <sgarzare@redhat.com>
hw/alpha/dp264.c       |  8 ++++++--
hw/hppa/machine.c      |  7 +++++--
hw/hyperv/hyperv.c     |  4 ++--
hw/hyperv/vmbus.c      |  4 ++--
hw/ipmi/ipmi_bmc_sim.c |  2 ++
hw/m68k/next-cube.c    |  9 ++++++++-
hw/m68k/q800.c         |  7 +++++--
hw/m68k/virt.c         |  7 +++++--
hw/microblaze/boot.c   |  4 ++++
hw/net/igbvf.c         |  2 +-
hw/net/rocker/rocker.c |  2 +-
hw/pci/msix.c          |  2 +-
hw/ppc/amigaone.c      |  9 +++++++++
hw/ppc/e500.c          | 10 ++++++++++
hw/ppc/mac_newworld.c  | 10 ++++++++++
hw/ppc/mac_oldworld.c  | 10 ++++++++++
hw/ppc/pegasos.c       |  5 +++++
hw/ppc/pnv.c           | 20 ++++++++++++++++----
hw/ppc/ppc440_bamboo.c |  4 ++++
hw/ppc/prep.c          | 10 ++++++++++
hw/ppc/sam460ex.c      |  5 +++++
hw/ppc/spapr.c         |  8 ++++++++
hw/ppc/virtex_ml507.c  |  9 +++++++++
hw/remote/proxy.c      | 15 +++++++++++++--
hw/scsi/megasas.c      | 16 +++++++++++-----
hw/sparc/leon3.c       |  5 +++++
hw/usb/hcd-xhci-pci.c  | 17 ++++++++++++-----
hw/vfio/ap.c           |  2 +-
hw/vfio/ccw.c          |  2 +-
hw/vfio/pci-quirks.c   |  2 +-
hw/vfio/pci.c          |  2 +-
hw/virtio/vhost-vdpa.c |  4 ++--
32 files changed, 185 insertions(+), 38 deletions(-)
[PATCH 0/4] Fix error handling for callers of
Posted by Trieu Huynh 4 weeks ago
From: Trieu Huynh <vikingtc4@gmail.com>

This series audits callers of load_image_targphys(), get_image_size(),
event_notifier_init(), and msix_init() as discussed in issue #413.
The callers are updated to cover negative return value instead of
continuing with invalid state or failure.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/413

Trieu Huynh (4):
  hw/core/loader: fix error handling for load_image_targphys callers
  hw/core/loader: fix error handling for get_image_size callers
  util/event_notifier: fix error handling for event_notifier_init
    callers
  hw/pci/msix: fix error handling for msix_init callers

 hw/alpha/dp264.c       |  8 ++++++--
 hw/hppa/machine.c      |  7 +++++--
 hw/hyperv/hyperv.c     |  4 ++--
 hw/hyperv/vmbus.c      |  4 ++--
 hw/ipmi/ipmi_bmc_sim.c |  2 ++
 hw/m68k/next-cube.c    |  9 ++++++++-
 hw/m68k/q800.c         |  7 +++++--
 hw/m68k/virt.c         |  7 +++++--
 hw/microblaze/boot.c   |  4 ++++
 hw/net/igbvf.c         |  2 +-
 hw/net/rocker/rocker.c |  2 +-
 hw/pci/msix.c          |  2 +-
 hw/ppc/amigaone.c      |  9 +++++++++
 hw/ppc/e500.c          | 10 ++++++++++
 hw/ppc/mac_newworld.c  | 10 ++++++++++
 hw/ppc/mac_oldworld.c  | 10 ++++++++++
 hw/ppc/pegasos.c       |  5 +++++
 hw/ppc/pnv.c           | 20 ++++++++++++++++----
 hw/ppc/ppc440_bamboo.c |  4 ++++
 hw/ppc/prep.c          | 10 ++++++++++
 hw/ppc/sam460ex.c      |  5 +++++
 hw/ppc/spapr.c         |  8 ++++++++
 hw/ppc/virtex_ml507.c  |  9 +++++++++
 hw/remote/proxy.c      | 15 +++++++++++++--
 hw/scsi/megasas.c      | 16 +++++++++++-----
 hw/sparc/leon3.c       |  5 +++++
 hw/usb/hcd-xhci-pci.c  | 17 ++++++++++++-----
 hw/vfio/ap.c           |  2 +-
 hw/vfio/ccw.c          |  2 +-
 hw/vfio/pci-quirks.c   |  2 +-
 hw/vfio/pci.c          |  2 +-
 hw/virtio/vhost-vdpa.c |  4 ++--
 32 files changed, 185 insertions(+), 38 deletions(-)

-- 
2.43.0