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 8625743EA9 for ; Fri, 19 Apr 2024 05:12:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C77840633; Fri, 19 Apr 2024 05:12:56 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2114.outbound.protection.outlook.com [40.107.212.114]) by mails.dpdk.org (Postfix) with ESMTP id 5EF484027D; Fri, 19 Apr 2024 05:12:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BIR/TXsM7kFeZoNQfpRQ+UomcJdpQMbo3qtYNxbQXRnskpld8bbZSBXAJrEeA/gqSXi1FdLb7IsuYW07ReL6XfmRlLCvY6zZKBEdsqVqXsh+JKL98FmD1ofkT+jzB3ywQmW6lWhcNNUvSXJGT5FIJ/yxnWlqwuSGIwY46TyB4I+0yGXINN/LiejXJfz8ZQon+ieWJEBuL60erbG11IH/djJfw5hERhm5bL1QSlSZDKrkZz55YxjgUr9eHagNWXwTgXtV55MK6so0Br54qgI6+8O/ts9ion1Lw1P8BQoJn3m97GM1DaiMCIPc+zyW/2XVfpcZnYdDEmwh++SNPtrz6A== 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=xezgCZBF0qLHcaebuMnGFAdPaFEa6gYY0ZnSvkuua/k=; b=RQIWMnfk+VEPFaUi5NgCfczcDtVacU1ub677/vl2QyduqQ4RvXJEFpqR9BLITisM+ObUHQ5/iB7DjOYzAE9UURVFeANziTz12Y2H34jo/9aTub/gZLli8v57t9Vf2ksdTh3iUrGyV/YlgCViF1otuxuSBJBm0qNuwp3H8KbfIcCXgsnnKeGDwgjBpRXTO+Eb3xPADH1O9ItIYJWsu4lZVOFzoL8buxa874fd2fLn62Hb7NK73zjC8pitJuxpuTCoTnMmvhOsBwTVme+DrrzF7O5hhE1PgXjCU27zkvEkfW3SjSJfZxFmKq02qOzC45P1aRr7aSMMjrqbmao4a2BQcw== 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=xezgCZBF0qLHcaebuMnGFAdPaFEa6gYY0ZnSvkuua/k=; b=Z1RBTPJ2tzuUI+OLYCatKeEld5Xyqy5FP1y9OfrMuYtWb0c16UNsUlmlf20sfA5jn3HpWs8Wei4KPgfHT0wV1zk/ye5xEJqzk0MdLKZJJzXiEymTaGfeDx75AQdyUfT0uOUNIp0y9uWcDxQkU5V2OYVK7c7bsPBKCuV05kW1yu8= 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 IA2PR13MB6587.namprd13.prod.outlook.com (2603:10b6:208:4ab::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.43; Fri, 19 Apr 2024 03:12:50 +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.7472.042; Fri, 19 Apr 2024 03:12:50 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 1/8] net/nfp: fix resource leak of secondary process Date: Fri, 19 Apr 2024 11:12:19 +0800 Message-Id: <20240419031226.1191069-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240419031226.1191069-1-chaoyong.he@corigine.com> References: <20240419031226.1191069-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0044.apcprd01.prod.exchangelabs.com (2603:1096:4:193::8) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|IA2PR13MB6587:EE_ X-MS-Office365-Filtering-Correlation-Id: c98c8ff4-cb69-48b3-e1d2-08dc601e9870 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?edqMlsSxmp9yAvjdaYuIbxD0hnpPXcgV8k10X2weeWBoFke0brwGRn1D4xR3?= =?us-ascii?Q?MVfw5Spt55iK2sdEY++rT0gY/Bd11xIkv6lvjmUVH+X1PcHGdu7WP/vUZ7/f?= =?us-ascii?Q?0UNKZXzlgqgqZveHWtV0AtKoxR/c9rdbqFN5qgFPL5dpOTss2KMbGYZZRP+H?= =?us-ascii?Q?Fl+ocsS5ZDlrm5eci307q6BwKSbgI398xgFzM+zS/cahZIxYCS2OaiHK3Rwg?= =?us-ascii?Q?zyemmkRjHm+0cJQG4rWDq5J1FdhBTQM81niMHkyZ1pCps6SQwX9CVnjhIvsB?= =?us-ascii?Q?FyeDvN2xfDuDBLJvUUBN1mwN8nzjfxrTqNf16O3bf8M+fhpqPRe3WK/MDw+u?= =?us-ascii?Q?WqelY/DdFDGghQrEuJG2e6BVBKjs4oI/3m7A4IHObvid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xQ1SNGMbFkT4CJ2YCZoWMEjZDGHssmSv5JQaBfn52ALKuKAnUbsw?= =?us-ascii?Q?zrs5iq4m7itie5IAWTmpUx5uiXwLsRHB05xH5W84gVD+hA=3D=3D?= 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)(366007)(1800799015)(52116005)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?oc0Wwy/EBbxJy22plsWxdZ9t5lgMaxJTqwT1SdERx0wDsgrfxwzpndfVfzLp?= =?us-ascii?Q?p+wXyES0bE1JFEYWQuU03uB8bAHzBP9UOvvBTkpZhYzY2CWNGWY3nClnRsOH?= =?us-ascii?Q?Ol22lqL9neTKrcx6dMUwbID9Am3TnN9PqX1auX3rqkeOTfy/s2hr6sF5HYfO?= =?us-ascii?Q?7T2zuacq0Cq6/KYRDEijrjI7xhnoxvr2JGAEr5GUxJh++P8/GKTgV37e1YfI?= =?us-ascii?Q?czyfRB/24zzlIy6ufNKlfV1rhu8YoP5CV2tpZg08XUC8esqSVgtVuKKZp2A3?= =?us-ascii?Q?zkUgFPUrLm51irWxC4wLoUJhFfostx9+XQ/TOyupNlC4+7qqfzymejqEcgfy?= =?us-ascii?Q?1nw9UP87v3gGlz2rUZTuJ5WzICymmsfiCIKGBXYewDHLIUgHuK8NqI8zhK3k?= =?us-ascii?Q?BpsUWTWn6HovVqImTY5lqlBY74gQwxLdW1t5MTErXlag8M2Q6aaiP3oLaxV1?= =?us-ascii?Q?CweLwqj4nwtLqBNTQARrRViGctoDJiuVLzoxfhra07RBttQQ96abN16BJSKr?= =?us-ascii?Q?XdGkeI90UT4cJWzS4LMGsElRFUcmwWQm55juXbkwWrK6BrJdOdFvMfJuvT8d?= =?us-ascii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W9tWXFrksK4t5lGfjyQJiGH6qpVGlzu?= =?us-ascii?Q?n8Eq76OSHslwBCSGhtxL/QGJURhVbpZLB8ms3KUdH6yj5NJPcl3BVMmHvJzL?= =?us-ascii?Q?UHZSTsEC+LTA4KqIH8+uMkM26FBG2pKxE7Uk68+18R1TIrCt6ndubSOffX+i?= =?us-ascii?Q?pA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: c98c8ff4-cb69-48b3-e1d2-08dc601e9870 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2024 03:12:50.5914 (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: ytua+THRGAziRgL28m6v9ywljf6GIh3ouOXlDu+nsvNtqhUj2wzaE7LikKcXH4gZJeOJKbzpkEj6t2KuhDC+C4vd4kLZgRGtwpqawwF6J2g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA2PR13MB6587 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 Fix one resource leak problem in the abnormal logic of secondary process. Fixes: 016141b18b3a ("net/nfp: refactor secondary process probe") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index b711e15b9f..98d8e87028 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -2123,7 +2123,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev) if (sym_tbl == NULL) { PMD_INIT_LOG(ERR, "Something is wrong with the firmware symbol table"); ret = -EIO; - goto sync_free; + goto cpp_cleanup; } /* Read the app ID of the firmware loaded */ @@ -2171,6 +2171,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev) sym_tbl_cleanup: free(sym_tbl); +cpp_cleanup: + nfp_cpp_free(cpp); sync_free: nfp_sync_free(sync); pf_cleanup: -- 2.39.1