From patchwork Thu Oct 13 12:19:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 118153 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7718A00C2; Thu, 13 Oct 2022 14:19:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D97A642DC8; Thu, 13 Oct 2022 14:19:41 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 64F0C42DC7 for ; Thu, 13 Oct 2022 14:19:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665663580; x=1697199580; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=BP8PCamT71EO/++I0qDXd3Hgp7sIUUD+77ioueAJfgg=; b=kmlwHipjAEkVBCwM03Odo05PmjURJcScfawS7vZAh0ffWnjJZzQg6Sa6 c0ws4TYWHag7VPL2hT5/hm7X6FwpNt08K7V6J/2uBXrsoribIl4G/kTLd IL4e5UNWwm6DkjsDPiz6mFyc/FbmQAG4l+Z+nko/elwxQgVkJ6l4qcE9n Wk9gz9WTVG7p9DTy2CDTNY/07Mox8h3blAb4KvuMIzPpEevEQJS1Xg4j8 ZiVy9VK6NAly2TshN+JdBsj6bJx+Bg5RPv3FWcQDNIefRhORoxu68t/LC oZQ2x7yskElpMpy+VWRnqsjVB4C+zfpAU0KUI+UsOuIcWnzMdPDdqrzgS Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="306124633" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="306124633" 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:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="956141382" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="956141382" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by fmsmga005.fm.intel.com with ESMTP; 13 Oct 2022 05:19:15 -0700 From: Radu Nicolau To: Jingjing Wu , Beilei Xing Cc: dev@dpdk.org, Radu Nicolau , gakhil@marvell.com Subject: [PATCH 1/3] net/iavf: fix security session destroy Date: Thu, 13 Oct 2022 13:19:11 +0100 Message-Id: <20221013121913.3543260-1-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Acked-by: Akhil Goyal --- drivers/net/iavf/iavf_ipsec_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c index afd7f8f467..46a77afa27 100644 --- a/drivers/net/iavf/iavf_ipsec_crypto.c +++ b/drivers/net/iavf/iavf_ipsec_crypto.c @@ -1042,7 +1042,7 @@ iavf_ipsec_crypto_session_destroy(void *device, return -EINVAL; ret = iavf_ipsec_crypto_sa_del(adapter, iavf_sess); - rte_mempool_put(rte_mempool_from_obj(iavf_sess), (void *)iavf_sess); + memset(iavf_sess, 0, sizeof(struct iavf_security_session)); return ret; }