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

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:02:10 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

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

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b0a7aab7d885cb771cf6520e405c495c7ab0c18c

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From b0a7aab7d885cb771cf6520e405c495c7ab0c18c 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
Cc: Luca Boccassi <bluca at debian.org>

[ 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 4de588d752..90cad7fffd 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -598,7 +598,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) {
 			VHOST_LOG_CONFIG(ERR,
 				"Failed to allocate memory for vring:%u.\n", i);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.609535600 +0800
+++ 0036-vhost-fix-queue-initialization.patch	2021-06-12 06:53:56.180000000 +0800
@@ -1 +1 @@
-From 678a91efa23a50a16cd3c5a2b18a117daef3c840 Mon Sep 17 00:00:00 2001
+From b0a7aab7d885cb771cf6520e405c495c7ab0c18c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 678a91efa23a50a16cd3c5a2b18a117daef3c840 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -16 +18 @@
- lib/vhost/vhost.c | 2 +-
+ lib/librte_vhost/vhost.c | 2 +-
@@ -19,5 +21,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 4de588d752..90cad7fffd 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -598,7 +598,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)


More information about the stable mailing list