Centos-kernel-stream-9/drivers/virtio
Laurent Vivier 5fb5bd7a8b virtio_ring: Fix error reporting in virtqueue_resize
JIRA: https://issues.redhat.com/browse/RHEL-84199

Upstream Status: git@gitlab.com:redhat/centos-stream/src/kernel/centos-stream-9.git

commit 45ebc7e6c125ce93d2ddf82cd5bea20121bb0258
Author: Laurent Vivier <lvivier@redhat.com>
Date:   Wed May 21 11:22:34 2025 +0200

    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 ad48d53b5b3f ("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>

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2025-07-08 11:59:40 +02:00
..
Kconfig virtio-mem: s390 support 2025-05-12 13:03:14 +02:00
Makefile
virtio.c virtgpu: don't reset on shutdown 2025-04-29 09:58:38 +02:00
virtio_anchor.c
virtio_balloon.c mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER 2024-12-09 12:24:17 -05:00
virtio_dma_buf.c
virtio_input.c
virtio_mem.c virtio-mem: support CONFIG_PROC_VMCORE_DEVICE_RAM 2025-05-12 13:03:15 +02:00
virtio_mmio.c
virtio_pci_common.c
virtio_pci_common.h
virtio_pci_legacy.c
virtio_pci_legacy_dev.c
virtio_pci_modern.c
virtio_pci_modern_dev.c
virtio_ring.c virtio_ring: Fix error reporting in virtqueue_resize 2025-07-08 11:59:40 +02:00
virtio_vdpa.c