From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2ED8648950; Thu, 16 Oct 2025 12:28:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A37EF41104; Thu, 16 Oct 2025 12:28:11 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id 3B5E640E2B; Thu, 16 Oct 2025 12:28:09 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 10DFA201570; Thu, 16 Oct 2025 12:28:09 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id CFD1A2013AD; Thu, 16 Oct 2025 12:28:08 +0200 (CEST) Received: from lsv031405.swis.in-blr01.nxp.com (lsv031405.swis.in-blr01.nxp.com [92.120.147.93]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 08BBF180007D; Thu, 16 Oct 2025 18:28:07 +0800 (+08) From: Prashant Gupta To: dev@dpdk.org, stephen@networkplumber.org Cc: stable@dpdk.org Subject: [PATCH v2 01/15] net/dpaa2: fix uninitialized variable issue Date: Thu, 16 Oct 2025 15:57:51 +0530 Message-ID: <20251016102805.2453687-2-prashant.gupta_3@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251016102805.2453687-1-prashant.gupta_3@nxp.com> References: <20251014064035.1312896-1-prashant.gupta_3@nxp.com> <20251016102805.2453687-1-prashant.gupta_3@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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@dpdk.org Signed-off-by: Prashant Gupta --- .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 Potnuri Bharat Teja Pradeep Satyanarayana Prashant Bhole +Prashant Gupta Prashant Upadhyaya Prateek Agarwal Prathisna Padmasanan 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