From: Eugenio Pérez Date: Fri, 2 Jun 2023 17:34:51 +0000 (+0200) Subject: vdpa: fix not using CVQ buffer in case of error X-Git-Tag: qemu-xen-4.18.0-rc5^2~1^2~9 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bc1a3a177482fada68c08efcc9580b01fa1c7a45;p=qemu-xen.git 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 Message-Id: <20230602173451.1917999-1-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang (cherry picked from commit d45243bcfc61a3c34f96a4fc34bffcb9929daba0) Signed-off-by: Michael Tokarev --- diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 2b4b85d8f8..71a7dd1586 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -500,7 +500,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;