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 0C62543BBA for ; Thu, 7 Mar 2024 12:20:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 032DE410D5; Thu, 7 Mar 2024 12:20:48 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2135.outbound.protection.outlook.com [40.107.244.135]) by mails.dpdk.org (Postfix) with ESMTP id 52C1040272 for ; Thu, 7 Mar 2024 12:20:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QuIAuUzUPnP4o1eqm/p4dth+mPK7XVXYPSETGszLXkOAvRoYZUNrOoh3drzKBvJNdvHC9WHEs5Yxy+M++9ibCmodvO0vbryIYsZz20rPl36XTFEaQvMzSVA4PlT75NjVOIuRbENDRM2h07baMWUfxHQhoInG6P6xmz64+vatVF0ioLBRp0f597TlzSIFp+Mzn0cf+mgA0zz/bV3Wrj2fV8xfMO5FitjoNK37UJVcaobEUKiESiw6msUaGS2VbAU0fnJmAm/nBToM1E82XUt6rfflv4oKqOZuQ2IMV/kxcli67DLOE9BLpPZJL0wCvZM/bBddtlG90A7ANVvJO8bgwA== 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=ScMCXWQUKlUYclUyVFVAneYNbCClzQsztuHt78x12VQ=; b=gKHay5ANXJ3DmTHvqiaW1vN18a3elkmke/YfKRP6LISEcM/PFkJNdeJjoLqtNlCVOkkkfXFVP8Kb8/y9eM0b4VL/i5arZd+N0fhfYVG9grFS+Z0EuDTXKzs9vbRNFnv3oGlBVujms85umReYqbi40FZDdmNqBM/koYQBqkzZKRpmFlCoRKUxbK7CBF/5W6SUQUySciGEjm4cdD/8qHpwub8GWBenXzHG2O+nn8N81o5AT9wiAs6a4cqFdDlBk0uGQOnEQwHuoMhhT9kxg554ziC/NMsi3PGM6lGm+3pMYOb6Lx66u3LQSePMclIIyk/DKYTDppOJSG3mvqnOnetVcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ScMCXWQUKlUYclUyVFVAneYNbCClzQsztuHt78x12VQ=; b=OO7zWJk9LMM0u56a6iq2UtjOfDvvfckI4qTxDCo3SD1+RBBPAOYuP0oBKnG/uyMRBOho67d+I6+Dm40MjmQeRJzenNEBwGQ/CmkZIruSy7ovoG7DWl+5RnZmQX7kjZvvfnyparpQ/vUeMdztbMviNuoD+svfyTmF5O7xFSB6snU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB5959.namprd13.prod.outlook.com (2603:10b6:510:15d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.26; Thu, 7 Mar 2024 11:20:43 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 11:20:42 +0000 From: Chaoyong He To: stable@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH 22.11 v2 1/7] net/nfp: fix resource leak for CoreNIC firmware Date: Thu, 7 Mar 2024 19:20:17 +0800 Message-Id: <20240307112023.1867765-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240307112023.1867765-1-chaoyong.he@corigine.com> References: <20240307112023.1867765-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR01CA0045.prod.exchangelabs.com (2603:10b6:a03:94::22) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5959:EE_ X-MS-Office365-Filtering-Correlation-Id: 626bc9dd-7ab9-45eb-3f96-08dc3e98a05e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FzwgN9mHtrnIyyW8k2UBPqXfkxeou2oAeP34RANfadjpcbgaB+VSIIp7oGhfZmzL8Vqg3D5HaJ7CHVV82RRzXKeg2v6C7KafE4Gr+mAIU5PTw3TWSEYZEEfDRu73q+KaAqF870OkbXoeGlnNp4Px32RfKoZ2aEBwCzPLoE2QncAiMbXGFNhnxaiTCX2Mqh9uY+MAQOUt5+/DX2TEvsYn3i/BzTjwIurOkwhRdu20qhbObf3S3LdV5LGyatyqTM1ct9j0bBGCx0SNj3N+a9jUkDM8e6HCv6ZEgD/Lyxz9P2OgnWKDnM4uafam9l1DQGLZr9AI0XgA6aBtY+0d6O2aQw4Q+Hgle3CgyPsnkzvXaVMbP2GGPHatw3j+0RUbM5SrQrJ3w5EI7d4n4xdK8tu1Do/VhgRTIv/MPS78Dds5AqGp684oq845sSLuXeNByaOC7WTeszKAxEEEYJ4iFJ8SPncwEMnpNhxHKyab696RHexVgmS+tvIGeSJ6350v2z/1SfC33gOFNOda/ZIVzWnccektSNgWOKA1iv4d43FH39HTEKI2y48O/DksJvFoROJFgAuKZZspyhuGKN8bqtWMvP4me15mVHJW6IxdKEEAiwnSo2IGjPKcipB4RMbzSmXl3Vd7ENV3D8DmqqJz32phGlNpMybRU8TEOfFtPtuir2RgKRD3tOzCnOyCnxbsoYL9u7F+BldRyE1XIMHW8Zi/RA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?GMHhDot1b80XNF1BnCWQl7tPToW2Qn+3m97tcJLDg5KF2kvAiEI9Ojckdaw2?= =?us-ascii?Q?WjiPGPHhQIHidddlNlDX4FJWDbFiibp+xHcS/bzynzUNR6M4sTZmH9wTgZh3?= =?us-ascii?Q?KxNeJnxbKDCsuC5IiqRimLuGoIOnJ26xHXlc+0ndzdfO54PmosTRuU1uskpi?= =?us-ascii?Q?sMyxVA3aFQ6/iJYv6XPiDCtlS0dTVBTuqPdkUD9s1o7WlQgiOrlmMUbGe42h?= =?us-ascii?Q?602jkWXKVo+pn/HHreqtRuXjJ1Nqbc/D4pJnXrM3Z/RuUGx8PrNh42eWOeMz?= =?us-ascii?Q?gkEexU9hYeaJT2LwcR44LJyNjc4YW09fiXfjN0Aalv8WD1KIY08HP2jWAuWK?= =?us-ascii?Q?SUQ9/jkkbsbz7UFL/UgwOrpgOsRJA+iN4sEl/UYU4l9fr+kmkt4r6A39grMf?= =?us-ascii?Q?9wy3PRxbAq3SWILjHJqcBc1afOyPDQpr4k8bFp4S/4OSU7YA+BeDB7FoLsMw?= =?us-ascii?Q?MIxTEMdP3Innzy7kq6tgo9smhR3quqyKfTyooYMghDA9p1ZEXkU/dbPKAQVo?= =?us-ascii?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ZdRdEgj7l?= =?us-ascii?Q?0U8OmFPPCbsZzbtOYtoMLZd5sGd3OE3IchGZsUZ8BfoQh3wq3qk15w7FnmcZ?= =?us-ascii?Q?KFtkSh5d3/bPfoxhE8SUTCwi21VUZ8jsmvjqwobjsWsLeloRzoKyiZaHhNex?= =?us-ascii?Q?XbhPc2aZiygKefUCgKI7TDAGhLNGA/USMj7sLhOW5oXyrkdPckkRpNBKnm3b?= =?us-ascii?Q?Mw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 626bc9dd-7ab9-45eb-3f96-08dc3e98a05e X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 11:20:42.9059 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: v8q3gF12huaIiuHOn7TSaQkf+UQLB3sY+cOYZqL29aY3s7xiWGwSf2ukFKhXpZ68zHSwkXSx2L2zcOLrhmYzfnvabLlT7Ppl1Hy5T6yIGf0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5959 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 [ upstream commit 8b8f116b199e31795ecd5cedb12302f10c0ae5a4 ] Fix the resource leak problem in the logic of CoreNIC firmware application. Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file") Signed-off-by: Chaoyong He --- drivers/net/nfp/nfp_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 3b70f5c..77f573c 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -920,10 +920,9 @@ nfp_init_app_fw_nic(struct nfp_pf_dev *pf_dev) struct rte_eth_dev *tmp_dev; tmp_dev = app_fw_nic->ports[i]->eth_dev; rte_eth_dev_release_port(tmp_dev); - app_fw_nic->ports[i] = NULL; } } - nfp_cpp_area_free(pf_dev->ctrl_area); + nfp_cpp_area_release_free(pf_dev->ctrl_area); app_cleanup: rte_free(app_fw_nic); -- 2.39.1