[dpdk-stable] patch 'net/ifc: check VFIO query error' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:57 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

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

Thanks.

Kevin.

---
>From cf40f1ba3b49ec975daaed9b3eba13abbcf44e3b Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang at intel.com>
Date: Tue, 26 Nov 2019 09:59:31 -0500
Subject: [PATCH] net/ifc: check VFIO query error

[ upstream commit ac466a1d6c7892cc835e1ccbcdc83336c2f44701 ]

It's possible that we fail to get the IOMMU group of ifcvf device, this
patch adds a check on the return value.

Coverity issue: 349894
Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")

Signed-off-by: Xiao Wang <xiao.w.wang at intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/ifc/ifcvf_vdpa.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c
index 698d14f88..eb4773a5a 100644
--- a/drivers/net/ifc/ifcvf_vdpa.c
+++ b/drivers/net/ifc/ifcvf_vdpa.c
@@ -113,5 +113,5 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)
 	char devname[RTE_DEV_NAME_MAX_LEN] = {0};
 	int iommu_group_num;
-	int i;
+	int i, ret;
 
 	internal->vfio_dev_fd = -1;
@@ -120,6 +120,10 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)
 
 	rte_pci_device_name(&dev->addr, devname, RTE_DEV_NAME_MAX_LEN);
-	rte_vfio_get_group_num(rte_pci_get_sysfs_path(), devname,
+	ret = rte_vfio_get_group_num(rte_pci_get_sysfs_path(), devname,
 			&iommu_group_num);
+	if (ret <= 0) {
+		DRV_LOG(ERR, "%s failed to get IOMMU group", devname);
+		return -1;
+	}
 
 	internal->vfio_container_fd = rte_vfio_container_create();
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:17.764362709 +0000
+++ 0065-net-ifc-check-VFIO-query-error.patch	2019-12-11 21:24:12.747649564 +0000
@@ -1 +1 @@
-From ac466a1d6c7892cc835e1ccbcdc83336c2f44701 Mon Sep 17 00:00:00 2001
+From cf40f1ba3b49ec975daaed9b3eba13abbcf44e3b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac466a1d6c7892cc835e1ccbcdc83336c2f44701 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 9c562def0..da4667ba5 100644
+index 698d14f88..eb4773a5a 100644
@@ -23 +24 @@
-@@ -137,5 +137,5 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)
+@@ -113,5 +113,5 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)
@@ -30 +31 @@
-@@ -144,6 +144,10 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)
+@@ -120,6 +120,10 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal)



More information about the stable mailing list