qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vdpa: fix not using CVQ buffer in case of error
@ 2023-06-02 17:34 Eugenio Pérez
  2023-06-06  1:32 ` Jason Wang
  2023-06-07 10:10 ` Michael Tokarev
  0 siblings, 2 replies; 6+ messages in thread
From: Eugenio Pérez @ 2023-06-02 17:34 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cindy Lu, Michael S. Tsirkin, Laurent Vivier, Lei Yang,
	Jason Wang, Hawkins Jiawei

Bug introducing when refactoring.  Otherway, the guest never received
the used buffer.

Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 net/vhost-vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 16d47f7b3c..5360924ba0 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -807,7 +807,7 @@ static int vhost_vdpa_net_handle_ctrl_avail(VhostShadowVirtqueue *svq,
     }
 
     if (*s->status != VIRTIO_NET_OK) {
-        return VIRTIO_NET_ERR;
+        goto out;
     }
 
     status = VIRTIO_NET_ERR;
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-07 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 17:34 [PATCH] vdpa: fix not using CVQ buffer in case of error Eugenio Pérez
2023-06-06  1:32 ` Jason Wang
2023-06-07  8:18   ` Lei Yang
2023-06-07 10:10 ` Michael Tokarev
2023-06-07 13:52   ` Eugenio Perez Martin
2023-06-07 16:04     ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).