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

Kevin Traynor ktraynor at redhat.com
Wed Mar 22 11:32:07 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.4

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/400ac4f9daafb903b476b2e43b5853024407d12f

Thanks.

Kevin

---
>From 400ac4f9daafb903b476b2e43b5853024407d12f 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

[ 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 c5c8bbd572..f82b93af65 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -137,4 +137,6 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
 		}
 		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;
@@ -176,5 +178,4 @@ ifpga_scan_one(struct rte_rawdev *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 &&
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-03-22 10:30:08.417427812 +0000
+++ 0020-bus-ifpga-fix-devargs-handling.patch	2023-03-22 10:30:07.933866586 +0000
@@ -1 +1 @@
-From 8a0b28b4d9581497d7b347c7c8797317707cd58f Mon Sep 17 00:00:00 2001
+From 400ac4f9daafb903b476b2e43b5853024407d12f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a0b28b4d9581497d7b347c7c8797317707cd58f ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index bb943b58b5..07e316b38e 100644
+index c5c8bbd572..f82b93af65 100644
@@ -24 +25 @@
-@@ -136,4 +136,6 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
+@@ -137,4 +137,6 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
@@ -31 +32 @@
-@@ -175,5 +177,4 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
+@@ -176,5 +178,4 @@ ifpga_scan_one(struct rte_rawdev *rawdev,



More information about the stable mailing list