[dpdk-stable] patch 'vhost: fix double-free with zero-copy' has been queued to LTS release 18.11.10

Kevin Traynor ktraynor at redhat.com
Fri Aug 28 12:12:40 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 09/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/59b99c4c9c48e0c80c72bf105c7f7dbd7f35c040

Thanks.

Kevin.

---
>From 59b99c4c9c48e0c80c72bf105c7f7dbd7f35c040 Mon Sep 17 00:00:00 2001
From: Patrick Fu <patrick.fu at intel.com>
Date: Tue, 21 Jul 2020 12:10:57 +0000
Subject: [PATCH] vhost: fix double-free with zero-copy

[ upstream commit a608436b635460c1be0d0d561838aa197cf32c87 ]

zmbufs should be set to NULL when getting freed to avoid double free on
the same buffer pointer

Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")

Signed-off-by: Patrick Fu <patrick.fu at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/librte_vhost/vhost_user.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index c88275c24f..2a6a23c4b2 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1396,4 +1396,5 @@ free_zmbufs(struct vhost_virtqueue *vq)
 
 	rte_free(vq->zmbufs);
+	vq->zmbufs = NULL;
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-28 11:03:26.304967569 +0100
+++ 0014-vhost-fix-double-free-with-zero-copy.patch	2020-08-28 11:03:25.942955602 +0100
@@ -1 +1 @@
-From a608436b635460c1be0d0d561838aa197cf32c87 Mon Sep 17 00:00:00 2001
+From 59b99c4c9c48e0c80c72bf105c7f7dbd7f35c040 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a608436b635460c1be0d0d561838aa197cf32c87 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index df0db8a07d..9ddeae3622 100644
+index c88275c24f..2a6a23c4b2 100644
@@ -22 +23 @@
-@@ -1935,4 +1935,5 @@ free_zmbufs(struct vhost_virtqueue *vq)
+@@ -1396,4 +1396,5 @@ free_zmbufs(struct vhost_virtqueue *vq)



More information about the stable mailing list