patch 'bus/ifpga: fix devargs handling' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:25:12 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.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 04/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/3bdf07e68240735a4051e3f3cf8dac9943dcfa46

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3bdf07e68240735a4051e3f3cf8dac9943dcfa46 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang at intel.com>
Date: Thu, 16 Mar 2023 16:44:12 -0400
Subject: [PATCH] bus/ifpga: fix devargs handling
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 8a0b28b4d9581497d7b347c7c8797317707cd58f ]

In function ifpga_scan_one(), variable 'path' is NULL if device argument
'afu_bts' is not set, subsequent string copy with 'path' would lead to
segmentation fault.

Fixes: 6fa4aa2b3645 ("bus/ifpga: fix forcing optional devargs")

Signed-off-by: Wei Huang <wei.huang at intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang at intel.com>
Acked-by: Rosen Xu <rosen.xu at intel.com>
---
 drivers/bus/ifpga/ifpga_bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index bb943b58b5..07e316b38e 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -135,6 +135,8 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
 			goto end;
 		}
 		afu_pr_conf.pr_enable = 1;
+		strlcpy(afu_pr_conf.bs_path, path,
+			sizeof(afu_pr_conf.bs_path));
 	} else {
 		afu_pr_conf.pr_enable = 0;
 	}
@@ -174,7 +176,6 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
 		rawdev->dev_ops->dev_start(rawdev))
 		goto end;
 
-	strlcpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path));
 	if (rawdev->dev_ops &&
 		rawdev->dev_ops->firmware_load &&
 		rawdev->dev_ops->firmware_load(rawdev,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:41.947147600 +0800
+++ 0124-bus-ifpga-fix-devargs-handling.patch	2023-04-09 21:45:38.799042200 +0800
@@ -1 +1 @@
-From 8a0b28b4d9581497d7b347c7c8797317707cd58f Mon Sep 17 00:00:00 2001
+From 3bdf07e68240735a4051e3f3cf8dac9943dcfa46 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 8a0b28b4d9581497d7b347c7c8797317707cd58f ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list