[PATCH 01/15] net/dpaa2: fix uninitialized variable issue
Prashant Gupta
prashant.gupta_3 at nxp.com
Tue Oct 14 08:00:31 CEST 2025
Initialize the kg_cfg structure before use in
rte_pmd_dpaa2_set_custom_hash(). This resolves an issue with
uninitialized memory access.
Fixes: 5f822962498e ("net/dpaa2: support custom hash key")
Cc: stable at dpdk.org
Signed-off-by: Prashant Gupta <prashant.gupta_3 at nxp.com>
---
.mailmap | 1 +
drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 0b043cb0c0..c260830f20 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1261,6 +1261,7 @@ Piotr Skajewski <piotrx.skajewski at intel.com>
Potnuri Bharat Teja <bharat at chelsio.com>
Pradeep Satyanarayana <pradeep at us.ibm.com>
Prashant Bhole <bhole_prashant_q7 at lab.ntt.co.jp>
+Prashant Gupta <prashant.gupta_3 at nxp.com>
Prashant Upadhyaya <prashant.upadhyaya at aricent.com> <praupadhyaya at gmail.com>
Prateek Agarwal <prateekag at cse.iitb.ac.in>
Prathisna Padmasanan <prathisna.padmasanan at intel.com>
diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index b1d473429a..13825046d8 100644
--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
- * Copyright 2016-2021,2023-2024 NXP
+ * Copyright 2016-2021,2023-2025 NXP
*
*/
@@ -60,6 +60,7 @@ rte_pmd_dpaa2_set_custom_hash(uint16_t port_id,
return -ENOMEM;
}
+ memset(&kg_cfg, 0, sizeof(struct dpkg_profile_cfg));
kg_cfg.extracts[0].type = DPKG_EXTRACT_FROM_DATA;
kg_cfg.extracts[0].extract.from_data.offset = offset;
kg_cfg.extracts[0].extract.from_data.size = size;
--
2.43.0
More information about the dev
mailing list