linux-yocto/drivers/virtio
Laurent Vivier 45ebc7e6c1 virtio_ring: Fix error reporting in virtqueue_resize
The virtqueue_resize() function was not correctly propagating error codes
from its internal resize helper functions, specifically
virtqueue_resize_packet() and virtqueue_resize_split(). If these helpers
returned an error, but the subsequent call to virtqueue_enable_after_reset()
succeeded, the original error from the resize operation would be masked.
Consequently, virtqueue_resize() could incorrectly report success to its
caller despite an underlying resize failure.

This change restores the original code behavior:

       if (vdev->config->enable_vq_after_reset(_vq))
               return -EBUSY;

       return err;

Fix: commit ad48d53b5b ("virtio_ring: separate the logic of reset/enable from virtqueue_resize")
Cc: xuanzhuo@linux.alibaba.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://patch.msgid.link/20250521092236.661410-2-lvivier@redhat.com
Tested-by: Lei Yang <leiyang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-07-03 11:40:02 +02:00
..
Kconfig virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
Makefile virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio_anchor.c
virtio_balloon.c virtio_balloon: Use outer variable 'page' 2025-01-08 07:29:05 -05:00
virtio_debug.c
virtio_dma_buf.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
virtio_input.c
virtio_mem.c virtio: mem: Switch to use hrtimer_setup() 2025-02-18 11:19:07 +01:00
virtio_mmio.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
virtio_pci_admin_legacy_io.c
virtio_pci_common.c virtio_pci: Add support for PCIe Function Level Reset 2025-01-27 09:39:26 -05:00
virtio_pci_common.h VFIO updates for v6.13 2024-11-27 12:57:03 -08:00
virtio_pci_legacy_dev.c
virtio_pci_legacy.c
virtio_pci_modern_dev.c
virtio_pci_modern.c virtio-pci: Fix result size returned for the admin command completion 2025-05-27 10:27:53 -04:00
virtio_ring.c virtio_ring: Fix error reporting in virtqueue_resize 2025-07-03 11:40:02 +02:00
virtio_rtc_arm.c virtio_rtc: Add Arm Generic Timer cross-timestamping 2025-05-27 10:27:54 -04:00
virtio_rtc_class.c virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio_rtc_driver.c virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio_rtc_internal.h virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio_rtc_ptp.c virtio_rtc: Add PTP clocks 2025-05-27 10:27:54 -04:00
virtio_vdpa.c
virtio.c virtgpu: don't reset on shutdown 2025-04-18 10:05:49 -04:00