[dpdk-stable] patch 'vhost: fix queue initialization' has been queued to stable release 19.11.9

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon May 17 18:09:59 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.9

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/3165834050d9c02b087c0fa0f0658c2a29f6e6d7

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 3165834050d9c02b087c0fa0f0658c2a29f6e6d7 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu at intel.com>
Date: Tue, 20 Apr 2021 04:57:43 -0400
Subject: [PATCH] vhost: fix queue initialization

[ upstream commit 678a91efa23a50a16cd3c5a2b18a117daef3c840 ]

This patch allocates vhost queue by rte_zmalloc() to avoid
undefined values.

Fixes: a277c7159876 ("vhost: refactor code structure")

Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Tested-by: Yinan Wang <yinan.wang at intel.com>
---
 lib/librte_vhost/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 2d5bb2cfde..b876e81dbd 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -568,7 +568,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
 		if (dev->virtqueue[i])
 			continue;
 
-		vq = rte_malloc(NULL, sizeof(struct vhost_virtqueue), 0);
+		vq = rte_zmalloc(NULL, sizeof(struct vhost_virtqueue), 0);
 		if (vq == NULL) {
 			RTE_LOG(ERR, VHOST_CONFIG,
 				"Failed to allocate memory for vring:%u.\n", i);
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:36.060209253 +0200
+++ 0170-vhost-fix-queue-initialization.patch	2021-05-17 17:40:29.495812029 +0200
@@ -1 +1 @@
-From 678a91efa23a50a16cd3c5a2b18a117daef3c840 Mon Sep 17 00:00:00 2001
+From 3165834050d9c02b087c0fa0f0658c2a29f6e6d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 678a91efa23a50a16cd3c5a2b18a117daef3c840 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -16 +17 @@
- lib/vhost/vhost.c | 2 +-
+ lib/librte_vhost/vhost.c | 2 +-
@@ -19,5 +20,5 @@
-diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
-index a70fe01d8f..ea38cf2b75 100644
---- a/lib/vhost/vhost.c
-+++ b/lib/vhost/vhost.c
-@@ -608,7 +608,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
+diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
+index 2d5bb2cfde..b876e81dbd 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -568,7 +568,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
@@ -30 +31 @@
- 			VHOST_LOG_CONFIG(ERR,
+ 			RTE_LOG(ERR, VHOST_CONFIG,


More information about the stable mailing list