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 5B9E843EAA for ; Fri, 19 Apr 2024 07:24:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43D6840395; Fri, 19 Apr 2024 07:24:16 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2119.outbound.protection.outlook.com [40.107.237.119]) by mails.dpdk.org (Postfix) with ESMTP id 5FD2D4027D; Fri, 19 Apr 2024 07:24:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KVFXQ2Ty7p1gvguttskJ6miam8KmIzidwhxzEwrG3OHvHDfuCSD5r2xEM512ITXPOLsGGEdZPvCZx7nOJTMAVB/mGea0Trs3qn3A8V4B2eKPIFJhQrZXIYIBtEena0JWFXNXcRdj2wgr0ZPjbA+BWe2uRxBBDlV/HCBmLXqtaoGez2lq9nyeAYSuc+OqdilXsRPJ0AcBTGLCXyrL55KI0DURN7IJS01s8Z21NKeN5vl2Kp3cHiLQPxZRc/kzF5q6LexNFcJuTC/BVuGl/5Cbss2bIPjMfMG8zkAVNWPFPFHP9knKcvH9Mo/Y0mOYjbiG0yRHu3osGYqYbrP4i8S7Hw== 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=RwDvxGJ+Z41to+Y7jEk5w71/31S4oAKztTlVSvBnLImbfUVX1FcxClEgl0QmhfkQ01lN0/bWBj7HjoduI73gc6JMfp0i49c2x13DyXzqMkP/eYAdMoy2pu4eQ2oEN81UpWyg7Xz37NRYZovLHH6ASXumkuonbgPfxdGj7lfjWrG57ZqcvfIm8v3NPahFVuafseuIf9o59eKaPS9moiBC7mdZNOUXY3z+UryY+yZaddZ84OfWQXuQ3tJ0eDwnziTZ4JZ1xVIF0jyj3ikYxDBZDmOLxbyrFwQPWb0i0JyX54WY10fVcKPmz0jphRYb2le3W4IOQ0iM36bBdFxwRENn+w== 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=V3FSabbTbMWfTeRwkc5MLwQjCfwUGBjwuDHxqH1uuNkvHXGdR1OarnfWzDZV3h7/cLMiH32fMHceaOCXETHsUVqx+EVUCdIEUoaE7V+KAl5Dm3jFfH95FL43OkRH2FjRzY4DXusneYXYvmlRLXYFb8zHLSzuPi8zQKIFP5ycfGY= 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 MW3PR13MB3961.namprd13.prod.outlook.com (2603:10b6:303:2c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.42; Fri, 19 Apr 2024 05:24:11 +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 05:24:11 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH v2 1/8] net/nfp: fix resource leak of secondary process Date: Fri, 19 Apr 2024 13:23:42 +0800 Message-Id: <20240419052349.1294696-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240419052349.1294696-1-chaoyong.he@corigine.com> References: <20240419031226.1191069-1-chaoyong.he@corigine.com> <20240419052349.1294696-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR03CA0087.apcprd03.prod.outlook.com (2603:1096:4:7c::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW3PR13MB3961:EE_ X-MS-Office365-Filtering-Correlation-Id: c7bccfe4-d5f2-4125-a678-08dc6030f1ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8hIvGXzmii5eNG70SizNCFy0CgU1VkUTAJoEhQQ006sbVJyOV9Iq6X19QbzJ?= =?us-ascii?Q?mqwqjV1/q2RActnerXpURd7G55qW/VrLEdQtwfdmt5gsF+9DmXp9zEMr/3hj?= =?us-ascii?Q?oud8Wm41P76UyfJvjfo1/2fiw8QZqwz/+zoBr0/pJaTV1RQdZGpDIPIScN6T?= =?us-ascii?Q?dmLX/fT1DOLGtR2qfUVMdlFXS/7rjmbwcb0zrEz50c5qIw0uPjPmCCoI5z18?= =?us-ascii?Q?4MJAz8bDgSClV1InTT5xXZk3/PglfIa1YsRSExXxrg24gBU9d9Siy3Qy3mWk?= =?us-ascii?Q?S3zCBinsG/Q2Jge/hFguPUqpOLc75OoyJjYWEgYXnWfBs3I0gFXBHKGlWoSx?= =?us-ascii?Q?HeBBwC4D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ZNerU8smP?= =?us-ascii?Q?weKEjcqIOGzg1GxQHgrg5Y3Km3hNwc4c9fC4Eqj28ZYwN1X7W6VsdU2PMn2J?= =?us-ascii?Q?/qu96efrVlO1REQq9FGW2pLTTw19vKlRa4defzc01tMmPw=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)(52116005)(1800799015)(366007)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?GLKMscAVHzPy0HmfZFmVVsN3VaAtQGAND/QCMOf2SUWJc+peS1Sowy1Y+/Em?= =?us-ascii?Q?Lr5ZscQjdI5iQkKw2cPcjKU9Aa/hkjRXGE6Ar+giVnwr5XgUAtv2NHP9swq6?= =?us-ascii?Q?hcVuZnqWUBYZZEMp8zK/nXogljvbB7QfEso9iMZLaCW80YhEjQE1XO/QbXco?= =?us-ascii?Q?gcuHBR+KP7EbsahnMLZps1T8ZHk8bWpE33w0SwJ3vKPvAXEr7x5Xg1Zpacse?= =?us-ascii?Q?LBfS/USHenMr4Nsp8PbfLyC/rizgF3BpyvL51W1ZkbxTkjXQj3jspWBmTKLg?= =?us-ascii?Q?YzPBb9lGwIR+Gaq+W6fdmUNKpRw873GZVMWLy7b8QF9l23bwCeYov9sd0bjI?= =?us-ascii?Q?KLKJA57iLZh8ROpMFPExsXqEmy/AZr1EOdxyWREQjFR4qSYD+iMKF2cMbdZA?= =?us-ascii?Q?HdiXdc0Iu06hBJVyno2eLY9fk53tusL+O3S+6CW/uI5NoLRcvPh84CAr6MzG?= =?us-ascii?Q?XAigTn4g3Ui+TvwL9fSmW+b/uT1bq8UfFT9D1I1YE19tHfnmIsOLgC1iUuzK?= =?us-ascii?Q?qcyoggzN+3SgQuEnr0fk+8Jp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c?= =?us-ascii?Q?EIl/gCZjv5sKi4S/WQ9744oyx1RFfOdKCsldpaklIZa2YN6zTkpPpcblpstf?= =?us-ascii?Q?8yqNPoSKniUxyV9JcqS2tvWBMXOzYH9eAYB46phgi3QWOdHU62CndsiVJ9Zy?= =?us-ascii?Q?Agd6MNL2ECnf6aRNT6aiRq9fSUhR1BhT1Q/PuvlMBnxQQEarV2V0u1X3E+g1?= =?us-ascii?Q?ig=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7bccfe4-d5f2-4125-a678-08dc6030f1ab X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2024 05:24:11.1945 (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: 4iat1KUv0wIynCZ0MLqHDrG7vF4LEwunWRz7vxQ2tDXagGKslfYixaz6p6NqMKRUqN0pkAUGS+eF6784Ww0KUTQfN1ajJKkHwOKmOp5BzkY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR13MB3961 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