[dpdk-stable] patch 'examples/vhost: check memory table query' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:01:09 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 05/12/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/1716e668784eb5d2e42bd7d2489990c09c49998b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 1716e668784eb5d2e42bd7d2489990c09c49998b Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia at intel.com>
Date: Fri, 19 Feb 2021 10:40:11 +0800
Subject: [PATCH] examples/vhost: check memory table query
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 1739f814258cf7f4e25d55710918fa0ecc4d828e ]

This patch fixes unchecked return value for rte_vhost_get_mem_table(),
which is reported by coverity.

Coverity issue: 364233
Fixes: ca059fa5e290 ("examples/vhost: demonstrate the new generic APIs")

Signed-off-by: Chenbo Xia <chenbo.xia at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 examples/vhost/virtio_net.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c
index 8ea6b36d59..28e4b00960 100644
--- a/examples/vhost/virtio_net.c
+++ b/examples/vhost/virtio_net.c
@@ -23,6 +23,7 @@ vs_vhost_net_setup(struct vhost_dev *dev)
 	uint16_t i;
 	int vid = dev->vid;
 	struct vhost_queue *queue;
+	int ret;
 
 	RTE_LOG(INFO, VHOST_CONFIG,
 		"setting builtin vhost-user net driver\n");
@@ -33,7 +34,12 @@ vs_vhost_net_setup(struct vhost_dev *dev)
 	else
 		dev->hdr_len = sizeof(struct virtio_net_hdr);
 
-	rte_vhost_get_mem_table(vid, &dev->mem);
+	ret = rte_vhost_get_mem_table(vid, &dev->mem);
+	if (ret < 0) {
+		RTE_LOG(ERR, VHOST_CONFIG, "Failed to get "
+			"VM memory layout for device(%d)\n", vid);
+		return;
+	}
 
 	dev->nr_vrings = rte_vhost_get_vring_num(vid);
 	for (i = 0; i < dev->nr_vrings; i++) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.725083200 +0800
+++ 0121-examples-vhost-check-memory-table-query.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 1739f814258cf7f4e25d55710918fa0ecc4d828e Mon Sep 17 00:00:00 2001
+From 1716e668784eb5d2e42bd7d2489990c09c49998b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 1739f814258cf7f4e25d55710918fa0ecc4d828e ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 64bf3d19ff..9064fc3a82 100644
+index 8ea6b36d59..28e4b00960 100644


More information about the stable mailing list