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: replace restricted mem access flag with callback 2022-08-01 07:42:49 +02:00
virtio_balloon.c virtio_balloon: Use outer variable 'page' 2025-01-08 07:29:05 -05:00
virtio_debug.c virtio: add debugfs infrastructure to allow to debug virtio features 2024-04-26 13:26:53 +02:00
virtio_dma_buf.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
virtio_input.c virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00
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: Introduce APIs to execute legacy IO admin commands 2023-12-19 11:51:33 -07:00
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/virtio_pci_legacy_dev: ensure the correct return value 2022-01-14 18:50:53 -05:00
virtio_pci_legacy.c virtio: rename find_vqs_info() op to find_vqs() 2024-07-17 05:20:57 -04:00
virtio_pci_modern_dev.c virtio-pci: Introduce admin virtqueue 2023-12-19 11:51:31 -07:00
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_vdpa: remove redundant check on desc 2024-11-12 18:07:46 -05:00
virtio.c virtgpu: don't reset on shutdown 2025-04-18 10:05:49 -04:00