Commit ba349c7
committed
virtio_ring: Fix error reporting in virtqueue_resize
JIRA: https://issues.redhat.com/browse/RHEL-84409
commit 45ebc7e
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 ad48d53 ("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>1 parent e67fe5a commit ba349c7
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2741 | 2741 | | |
2742 | 2742 | | |
2743 | 2743 | | |
2744 | | - | |
| 2744 | + | |
2745 | 2745 | | |
2746 | 2746 | | |
2747 | 2747 | | |
| |||
2763 | 2763 | | |
2764 | 2764 | | |
2765 | 2765 | | |
2766 | | - | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
2767 | 2771 | | |
2768 | 2772 | | |
2769 | 2773 | | |
| |||
0 commit comments