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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 14:00:13 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/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.

Thanks.

Luca Boccassi

---
>From 4b85b20128a39c5c3b763bbd509f83eba5b0af1d 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 82270c514..4cc0ce21e 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1872,6 +1872,7 @@ free_zmbufs(struct vhost_virtqueue *vq)
 	drain_zmbuf_list(vq);
 
 	rte_free(vq->zmbufs);
+	vq->zmbufs = NULL;
 }
 
 /*
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.317593757 +0100
+++ 0175-vhost-fix-double-free-with-zero-copy.patch	2020-07-24 12:53:48.599012273 +0100
@@ -1,13 +1,14 @@
-From a608436b635460c1be0d0d561838aa197cf32c87 Mon Sep 17 00:00:00 2001
+From 4b85b20128a39c5c3b763bbd509f83eba5b0af1d 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")
-Cc: stable at dpdk.org
 
 Signed-off-by: Patrick Fu <patrick.fu at intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index df0db8a07..9ddeae362 100644
+index 82270c514..4cc0ce21e 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -1934,6 +1934,7 @@ free_zmbufs(struct vhost_virtqueue *vq)
+@@ -1872,6 +1872,7 @@ free_zmbufs(struct vhost_virtqueue *vq)
  	drain_zmbuf_list(vq);
  
  	rte_free(vq->zmbufs);


More information about the stable mailing list