[dpdk-stable] [PATCH 17.11] vhost: release locks on RARP packet failure

Tiwei Bie tiwei.bie at intel.com
Wed Aug 1 09:41:34 CEST 2018


[ upstream commit 0989161b2636a9c9fc526baebaa7fb473e36a3cb ]

Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped")

Signed-off-by: Tiwei Bie <tiwei.bie at intel.com>
Reviewed-by: Jens Freimann <jfreimann at redhat.com>
---
 lib/librte_vhost/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 93c2679c4..bde360f3d 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1566,7 +1566,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
 		if (rarp_mbuf == NULL) {
 			RTE_LOG(ERR, VHOST_DATA,
 				"Failed to allocate memory for mbuf.\n");
-			return 0;
+			goto out;
 		}
 
 		if (make_rarp_packet(rarp_mbuf, &dev->mac)) {
-- 
2.18.0



More information about the stable mailing list