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 9A75443B86 for ; Tue, 5 Mar 2024 10:49:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 951A840FDE; Tue, 5 Mar 2024 10:49:35 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2058.outbound.protection.outlook.com [40.107.102.58]) by mails.dpdk.org (Postfix) with ESMTP id A00C04014F for ; Tue, 5 Mar 2024 10:49:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QArH7tJSR70k9OuCV1HAe7D/KnEmFEVs+OxUJRKLCyHcvQfVomsJzIIy4896ZbFc9mNhXrnMYlridv33NO6BF3jxwq+lGEA+CPY/P/k2XscB3Xtqk1dt4AVTdKKduNvhVlyFn4yowAOquY8e4TJ8DvTeAqhztl6JuShRlgcBCKPPqL/eWLJLFSIAYAFbM7JxhFu3nQP3JnSXKKDuPd5t1HSvs3XAExTJ1II7l1uq4ohIhfLdWr1AGaas9Y0qLrubg1D+fsfBBjdbnNePrB6GrcVJ1lcCnB28EZvBOFWMZBQ/rVJBMRZo4PPymR6DH1KW87C6A8cbTk9De4XeRC5KbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4Xln+EcPCOs/nhfPFdZvbAXMWxhQnfIZ7y7vBoDOdyg=; b=T9VCWdLHIA2INc98+obQTF2OIyeE2/gbRRcwGaxkFFyfUKGlwtmFPR+fD0G9hd/NZJf1yCNMrcO3YbjTAOGEqR2gtcj6di9DadBphx7CNikNh8ZPPv/1uh6yD4i6KB/iXffGSBbHqyJeqWxIdqfGsDK1okEpjXV+7nzn7hAk7yiNW3ZQ6zdpqonVXdMksEHm9CnbcsIQAWXjOV8Q3Fu+YodbWfA7GRql7ZcyWRdwnRHoSmEMeQCx85pZzDoSr52bQLz1bx8qDitH731EOxZCh+7hL5A5Io7atrRR83qza33l3tTYQAkRE4oyGv9rPFQ5AooNG1uOAAztyYO6/MRAvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4Xln+EcPCOs/nhfPFdZvbAXMWxhQnfIZ7y7vBoDOdyg=; b=ZadoAxtaaKIBl5UGJQueIcdOiNqb38QVr12mUr643lZNwponFTRNNrlO2QCgkgsQSCj9QOI+ZhAZzCy2wAxnMpfNQEGVq3s/Eio51Qh4OzeMncElxn9bsY8ECx3KAzynWt/FSsn4o2syta9HJM0yaNK4DhIwQS7+o7ALMGzBwmZOg2RKTEVT+6/aXBJgVgR1ENLM/ocK+lIngWEx6znPFy2JYeUnGtZVTFaRtVsyAOgjTXTPOqm1jXmqZzFlU/I1vJm9KNndA1ACXuTtp3L5Tw6xV+frJSl4gcUulsO83Mo2g2h3IeKmNa0tJfQ4uEKIm7suRyOHCXxrScE8iZmqVg== Received: from SN7PR04CA0105.namprd04.prod.outlook.com (2603:10b6:806:122::20) by SJ2PR12MB8783.namprd12.prod.outlook.com (2603:10b6:a03:4d0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:49:31 +0000 Received: from SN1PEPF0002BA4B.namprd03.prod.outlook.com (2603:10b6:806:122:cafe::9f) by SN7PR04CA0105.outlook.office365.com (2603:10b6:806:122::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:49:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SN1PEPF0002BA4B.mail.protection.outlook.com (10.167.242.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:49:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:49:10 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:49:08 -0800 From: Xueming Li To: Yunjian Wang CC: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix memory leak on security context error' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:45:51 +0800 Message-ID: <20240305094757.439387-11-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4B:EE_|SJ2PR12MB8783:EE_ X-MS-Office365-Filtering-Correlation-Id: 253b0dfb-e255-4ae4-8293-08dc3cf98dae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ve94OnXlAd9/qIZiEfnurEmFY6VBD+PKaXnvkxj6Bjzp6QS4/WsPc1FoZN5mR7Zi+thpjH4MZtLovWqZbKygVz3FqwGs8yY3RMh4yKaJ6ajSIF90moWjxYvlBgrutsjsp0Q+kFrnkXAhE0b4Eqgde9XbeKio6rh2O2cVWRD2oirmxAK38Bf3qvAv3kAtNj5+wG31ThmYcKy1oG4tRzBLWp+QL6Vlv2I0XBmbBd/sYb4nP9vTVyvfVZsbQP03T8BeCxn1VyS+qBO66V4QGzoVr1JxsUaIQCi3U6ll6xehP+jSjq0AW2t97/UXOdKBJmQg8Jh0W2/2KYfMKWELo/WHM5OFs/fJ9UhDisQY1eg4RRBzmY3PBTQLT7clGaMvv+SG9YCQ9LIXexbR3I9YxUKemjkloLa3TptufFrYzAMQ8aokeUWIwv2erkQtFJpNeTVojbo5ooZY4XQZ9bFsDcLD7fzj5QofhJ/7z+EuTGfOjuaB2/4i2TV1RqAcCoPhpIYwSOoYRg06cBKkWkNRMzP3ylPiPx23HLZ2Vf1WLFOZv1nXETi0cZWxkZfjfo4Q06NZeJLsm7pNDLSVdPz6OxJ4G82+0sR28KRhOgPPDNS8fj1ureermuJ+D5vvDFTrXyOKYp5euauy07KQnq78umgNscdBXrf6nK9EDFsFclKHiRFfBM5Ori/x8AIBV6kv3rB0tA8hkBrJ62cYaN/AF1qYGLLMk4EgaxhefV3NxOm2870X7Bbk5InvFYDMoy96MNqY X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:49:30.0065 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 253b0dfb-e255-4ae4-8293-08dc3cf98dae X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA4B.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8783 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/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=3defa10a78b056c43a0ffc585fdac4d4133e6da8 Thanks. Xueming Li --- >From 3defa10a78b056c43a0ffc585fdac4d4133e6da8 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Fri, 1 Dec 2023 18:46:49 +0800 Subject: [PATCH] net/iavf: fix memory leak on security context error Cc: Xueming Li [ upstream commit 8758ad5f8633ce4197271d41ece0cc7f799d3d6e ] In iavf_security_ctx_create() allocated memory for the 'security_ctx', we should free it when memory malloc for the 'iavf_security_ctx' fails, otherwise it will lead to memory leak. Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto") Signed-off-by: Yunjian Wang Acked-by: Qi Zhang --- drivers/net/iavf/iavf_ipsec_crypto.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c index 07a69db540..d6c0180ffd 100644 --- a/drivers/net/iavf/iavf_ipsec_crypto.c +++ b/drivers/net/iavf/iavf_ipsec_crypto.c @@ -1518,8 +1518,11 @@ iavf_security_ctx_create(struct iavf_adapter *adapter) if (adapter->security_ctx == NULL) { adapter->security_ctx = rte_malloc("iavf_security_ctx", sizeof(struct iavf_security_ctx), 0); - if (adapter->security_ctx == NULL) + if (adapter->security_ctx == NULL) { + rte_free(adapter->vf.eth_dev->security_ctx); + adapter->vf.eth_dev->security_ctx = NULL; return -ENOMEM; + } } return 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:31.422786015 +0800 +++ 0010-net-iavf-fix-memory-leak-on-security-context-error.patch 2024-03-05 17:39:30.663566489 +0800 @@ -1 +1 @@ -From 8758ad5f8633ce4197271d41ece0cc7f799d3d6e Mon Sep 17 00:00:00 2001 +From 3defa10a78b056c43a0ffc585fdac4d4133e6da8 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8758ad5f8633ce4197271d41ece0cc7f799d3d6e ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org