40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From 5da8eddfa24d42a3ef60e111becafa29549e7100 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
|
|
Date: Fri, 2 Jun 2023 19:34:51 +0200
|
|
Subject: [PATCH] vdpa: fix not using CVQ buffer in case of error
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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>
|
|
Message-Id: <20230602173451.1917999-1-eperezma@redhat.com>
|
|
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Acked-by: Jason Wang <jasowang@redhat.com>
|
|
Tested-by: Lei Yang <leiyang@redhat.com>
|
|
Signed-off-by: fangyi <eric.fangyi@huawei.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 94f74b54ae..afca8740bc 100644
|
|
--- a/net/vhost-vdpa.c
|
|
+++ b/net/vhost-vdpa.c
|
|
@@ -642,7 +642,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.27.0
|
|
|