patch 'net/nfp: fix dereference of null pointer' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:49:29 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.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 08/14/24. 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=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=51d6936232523f4f798868217607a8b781deef2d
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 51d6936232523f4f798868217607a8b781deef2d Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang at corigine.com>
Date: Wed, 19 Jun 2024 17:58:10 +0800
Subject: [PATCH] net/nfp: fix dereference of null pointer
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit bb177a392fe5e9f3b1145e29b5febbd8cfff4b6e ]
The original logic can not make sure the 'repr' pointer has
valid value and the dereference of null pointer will cause
a segment fault problem.
Fixes: eae7dadbe987 ("net/nfp: update link status reporting")
Signed-off-by: Peng Zhang <peng.zhang at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
---
drivers/net/nfp/flower/nfp_flower_ctrl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c
index c25487c277..102daa3d70 100644
--- a/drivers/net/nfp/flower/nfp_flower_ctrl.c
+++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c
@@ -441,6 +441,11 @@ nfp_flower_cmsg_port_mod_rx(struct nfp_app_fw_flower *app_fw_flower,
return -EINVAL;
}
+ if (repr == NULL) {
+ PMD_DRV_LOG(ERR, "Can not get 'repr' for port %#x", port);
+ return -EINVAL;
+ }
+
repr->link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
if ((msg->info & NFP_FLOWER_CMSG_PORT_MOD_INFO_LINK) != 0)
repr->link.link_status = RTE_ETH_LINK_UP;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:05.501181862 +0800
+++ 0092-net-nfp-fix-dereference-of-null-pointer.patch 2024-08-12 20:44:02.355069346 +0800
@@ -1 +1 @@
-From bb177a392fe5e9f3b1145e29b5febbd8cfff4b6e Mon Sep 17 00:00:00 2001
+From 51d6936232523f4f798868217607a8b781deef2d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit bb177a392fe5e9f3b1145e29b5febbd8cfff4b6e ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index de6e419cac..8cfafe91c8 100644
+index c25487c277..102daa3d70 100644
More information about the stable
mailing list