mbox series

[v4,0/2] virtio-pci: Fix the use of an uninitialized irqfd

Message ID 20240702020033.139261-1-lulu@redhat.com (mailing list archive)
Headers show
Series virtio-pci: Fix the use of an uninitialized irqfd | expand

Message

Cindy Lu July 2, 2024, 1:59 a.m. UTC
The crash was reported in MAC OS and NixOS, here is the link for this bug
https://gitlab.com/qemu-project/qemu/-/issues/2334
https://gitlab.com/qemu-project/qemu/-/issues/2321

changelog v4 -> v3
 - Address the comments in V3
 - sperate the return check in kvm_virtio_pci_vector_use_one()
   in different patch
changelog v3 -> v2
 - Move the vector_irqfd check to virtio_pci_get_notifier().
   This function can also be used while vdev->status is not VIRTIO_CONFIG_S_DRIVER_OK.
   In that case, the vector_irqfd could be NULL, so also add the status check here.
 - Add the return value check for kvm_virtio_pci_vector_use_one().
   Since the return value of function virtio_pci_set_vector() is void,
   just add the error message here.

Cindy Lu (2):
  virtio-pci: Fix the use of an uninitialized irqfd
  virtio-pci: Add check the return of kvm_virtio_pci_vector_use_one

 hw/virtio/virtio-pci.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)