diff options
author | Eugenio Pérez <eperezma@redhat.com> | 2023-06-02 19:34:51 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-06-26 19:35:39 +0300 |
commit | bc1a3a177482fada68c08efcc9580b01fa1c7a45 (patch) | |
tree | 74a8f8f415066bd91eb934769181e22502f42329 | |
parent | f3b7f02c3b85219d3e8fb9b2e8124f35424a4a75 (diff) |
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>
(cherry picked from commit d45243bcfc61a3c34f96a4fc34bffcb9929daba0)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | net/vhost-vdpa.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |