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 C0C98A00C2; Thu, 13 Oct 2022 14:19:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36D2C42F57; Thu, 13 Oct 2022 14:19:46 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 84DF442F40 for ; Thu, 13 Oct 2022 14:19:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665663582; x=1697199582; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uwQjYpKBQzkgGDVcLrfSesMrzReS/4wFvDia3TbcuvU=; b=f3YYyS0AGXw1bGCRtGv9Vzv5ZOAkGB6N41MrGH5pODOgfo7OIPAs5V2z qsPRDrnFbo8ClorBw4OaPVIP2SuICs+r00RWeIdNzoeM/yYems/X98cBJ V3sl9jpyZWrq0sGcml3+sa5Xo1NztyEaVEQH2mrOo5C0emdpw+IIkF9CA /gaRJIAI0VwCD7YVkfkG4svQeYaUgJT+f7SNZr5iDsMgfdlxEjZlwB6OG Mk8qr+beRloYA5l8aq3n+YqT/j09EtacOE+P9TEyB/LCN4Dn6zioG3Hva NBHXUV6X8l1PBJZRid3QnMaZnVDOoYl65Kl/U4U9bOtZ03qH0SE90wbq8 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="306124645" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="306124645" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2022 05:19:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="956141396" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="956141396" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by fmsmga005.fm.intel.com with ESMTP; 13 Oct 2022 05:19:20 -0700 From: Radu Nicolau To: Jiawen Wu , Jian Wang Cc: dev@dpdk.org, Radu Nicolau , gakhil@marvell.com Subject: [PATCH 3/3] net/txgbe: fix security session destroy Date: Thu, 13 Oct 2022 13:19:13 +0100 Message-Id: <20221013121913.3543260-3-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221013121913.3543260-1-radu.nicolau@intel.com> References: <20221013121913.3543260-1-radu.nicolau@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Replace mempool_put with memset 0, the internal session memory block is no longer allocated from a mempool Fixes: 3f3fc3308bd0 ("security: remove private mempool usage") Cc: gakhil@marvell.com Signed-off-by: Radu Nicolau --- drivers/net/txgbe/txgbe_ipsec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index b458b3a922..f9f8108fb8 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -409,7 +409,6 @@ txgbe_crypto_remove_session(void *device, { struct rte_eth_dev *eth_dev = device; struct txgbe_crypto_session *ic_session = SECURITY_GET_SESS_PRIV(session); - struct rte_mempool *mempool = rte_mempool_from_obj(ic_session); if (eth_dev != ic_session->dev) { PMD_DRV_LOG(ERR, "Session not bound to this device\n"); @@ -421,7 +420,7 @@ txgbe_crypto_remove_session(void *device, return -EFAULT; } - rte_mempool_put(mempool, (void *)ic_session); + memset(ic_session, 0, sizeof(struct txgbe_crypto_session)); return 0; } -- 2.25.1