aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2023-06-02 19:34:51 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-06-26 09:50:00 -0400
commitd45243bcfc61a3c34f96a4fc34bffcb9929daba0 (patch)
tree726a8cfd777d1c5246099b22e366eadfe6d1e84f /net
parent51e84244a7799172f4239482199e9b4bdcd23172 (diff)
downloadqemu-d45243bcfc61a3c34f96a4fc34bffcb9929daba0.zip
qemu-d45243bcfc61a3c34f96a4fc34bffcb9929daba0.tar.gz
qemu-d45243bcfc61a3c34f96a4fc34bffcb9929daba0.tar.bz2
vdpa: fix not using CVQ buffer in case of error
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>
Diffstat (limited to 'net')
-rw-r--r--net/vhost-vdpa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 75352ef..9e92b35 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -794,7 +794,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;