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 00E0C4567F; Mon, 22 Jul 2024 13:01:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5D81410FA; Mon, 22 Jul 2024 13:01:08 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id F2D004027F; Mon, 22 Jul 2024 13:00:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721646044; x=1753182044; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=RZJy7pnE31CeP3nFUpnUw4waOnFyCbqruhUavKAQDqU=; b=UoApLnugRCL0nu7dHI+nQUWMVyidc9l5UJKDzrpVkqNFiUGz9bbFH0qe A2Qgla5Al1LifCPYRbkw75woU5HpvmYgyHe9KqPnJg6o0XJLrar7Z0dCU NoEoFJ5PMXOeeqVUFDfjAMDrKHpIfaxQkK/SJs8GfFFvheYhCsQiV4jY2 4nLioY/dnEgUxRxfvX+Ukm561Zw5ZaA9gr9wORxD/YVhO3boDaERd0bK9 EEsmzAAW3B44OET0OD35LpEUt/39c6kmtE2Ffo/LypAigIOWYtmP8rQ6I E1p7icbCUmepx4WkyXIFGwoVCNIBvOLwCCCxBJVB1qdH/LRMu2IdzYmx1 g==; X-CSE-ConnectionGUID: fgLmTQZvRlmD/RPhZxMnwQ== X-CSE-MsgGUID: uIR9c/k5RoOqkakeD2FhFA== X-IronPort-AV: E=McAfee;i="6700,10204,11140"; a="36650631" X-IronPort-AV: E=Sophos;i="6.09,227,1716274800"; d="scan'208";a="36650631" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2024 04:00:43 -0700 X-CSE-ConnectionGUID: M0IG5MfkTQOv6H3nNVKwtQ== X-CSE-MsgGUID: 2cOJUd2rQAe3tOZt3jXxzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,227,1716274800"; d="scan'208";a="51575856" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 Jul 2024 04:00:42 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 22 Jul 2024 04:00:42 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 22 Jul 2024 04:00:42 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 22 Jul 2024 04:00:42 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 22 Jul 2024 04:00:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MsrwD+DVcltQsDq2TD0ZHV0kVy9jFCxo28h9P5ZwJx+nNc++XwVB7g70Vyfv0OZ4Je0d1jIMBmUjjRnCQWtsHSWlAtIvTo1EatRHhEu5x0dOeziTdtZ/E4Sw6oeeilgjvPPFtnQ/JON1tbzrk8oChApWRb70uNRHU+fHcTKw/v1P9n+tRnKBp6eM8+gYA3jXKWiaQQSDeoLVdwKjxeeO0R6APhmAuEtuX8sslAJw5g2UQvt45cg+n01wvYhmH5zY2wWeNskmzLGOIfGvtpGvjiKtlQbByIBgaCg92FZcNSd/RpoYH7Y9q3pIvhapBvztycx0Q3PNq6lsdkWUyEXHAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=AqiivEyc8SeOB3lV6gBmRFbdAzXWWrW2LlVSE2ZBUgU=; b=pacZDLXlBmB6ycS1b67yRV8sl0IjCqz7DKYuo7mzvL1LHH66niytN9DQXVOy9ISup/FeFNYIAK4RkPp8/yyvkMs6mD7P5w/b7FMkXuS7nDBFEqpkWXf2cQRA0fBCMbJ8Obxkk2iSFOJGAYhL+84iEPmbSDYDAqLRqaA15s3afB92bYJfW8Rriklgph5rY/EFXKees5X8dP0xv9DeF/UP8vlCuxH3+3gHJjXtwX6ag2CRzwm4hv1D7QAVdiAImkp7xIZs7A3cktkiVH7k+aEJ9IYrzFvQkq5w2Kw46bKgBddgtVn9tdyCrHh+iE/EynD8lzM6pgr36IZYpFynL5RGSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by CH3PR11MB7275.namprd11.prod.outlook.com (2603:10b6:610:14c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Mon, 22 Jul 2024 11:00:39 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b%4]) with mapi id 15.20.7762.020; Mon, 22 Jul 2024 11:00:39 +0000 From: "Medvedkin, Vladimir" To: "Richardson, Bruce" CC: "dev@dpdk.org" , "stable@dpdk.org" , "Stolarchuk, Michael" Subject: RE: [PATCH v3 1/3] net/ice: fix possible memory leak Thread-Topic: [PATCH v3 1/3] net/ice: fix possible memory leak Thread-Index: AQHa3BXbgUgzPyKvJEufHbq/dX3Fk7ICj1SAgAADyWA= Date: Mon, 22 Jul 2024 11:00:39 +0000 Message-ID: References: <20240715180441.3682734-1-vladimir.medvedkin@intel.com> <20240722082836.176515-1-vladimir.medvedkin@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR11MB5772:EE_|CH3PR11MB7275:EE_ x-ms-office365-filtering-correlation-id: 924d2a97-9ac3-47c3-389c-08dcaa3d85f1 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?dGha8py3XADUY36p4ZsnZXXynMIVqyPwSc/Qu7muDiFlp08DG8fXUS7IYMt/?= =?us-ascii?Q?vPMTOo1e68KC4a3N2tQFIRBxGuP99aDo+E2GfC+hM5N71ZhSWUHd2SBUNUA0?= =?us-ascii?Q?0g+RlNcY40DxCJZKjBIOfNHyguFJFui3ifhNqIcNDPvsSbiysXam/owoMBvF?= =?us-ascii?Q?93flBJ8mEL/5cuAZ742TCFowCSAUNb4MwdgNZXIT9fj2bBCyQo9H1aLFpoSn?= =?us-ascii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mgauSUhg0YNjDxbLhtb?= =?us-ascii?Q?d+g7orgPO2izCCG63uLn0QvcnovTO2EKJIeh3VFmuhBIlsLQfxKe0R6LyZ6m?= =?us-ascii?Q?t1Kkg8djV0ubkiGs37SpeheNoZRcqhUValds0URKcTVVXWbmLCxMVkWFirns?= =?us-ascii?Q?+5vrCXBRm8FJGSIYe/9ey/XGLpgDurPmTn80MQjNIwPOfvJQXWBCQT2ixXTY?= =?us-ascii?Q?4GuSjQ5XBMlxl42d3B0y0GMydB86rpUcm79C3uaPYLqfwlHKIEssQDDdaHvU?= =?us-ascii?Q?fXZEg7KpSnD+xzQS3U7SHejS8X9lANosasFio0yhyB7zftaKwQ=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8fLjhNJtg2epgaDCHT7yleTaiHmJpXQR8scq3tbbdRWFQmRPkmZ5gMXLOpKf?= =?us-ascii?Q?5TqroISn2f3WP1V4vCQRT+ijobf/3+cINl4ggNOrJ77qOYCY1DrRfRrQBiLg?= =?us-ascii?Q?f4PBz5GFuA//OjWSf/QYQbtkzDyhtSIwLcU82lMu33t0Z+z1HckdF+qfE8MB?= =?us-ascii?Q?Cl0Yj+pYiilyVK/VgkoeEHVU2wQfBPNTfLaD5z4avi312oCIemeT9lsSpO8d?= =?us-ascii?Q?d0XWZyOMzKncbhlz/Xr8ZtLo6LLNjdEuiNUgOzELiQ/1RFFf0eLoxVhC6o9N?= =?us-ascii?Q?GLhJBK1yo6hFm9ZW1/dcwk4RdC2KgsmXqNPHrkzL1MTG4PuxCtpaEXxNbKnW?= =?us-ascii?Q?XSQCpQuzdZtrSOvQSjC7pGtp5/WG4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ascii?Q?qLZfUVraj3YSCNPyG12pyznfrO2AlBsNb14OjE1ZUWIOO0/ycgZVmldkeNQ1?= =?us-ascii?Q?l0jm1RajktMG/UDT+pnuBwBKRQ8AxNBQjaTTvbV9Uy2s8B1euYPDnoqjFItM?= =?us-ascii?Q?wes5uxcHitoTTOB8w1W5DMWnYx5mxptQPT7WruJHxkmEoEJM+n3Og3jyiSxo?= =?us-ascii?Q?pgRvA0/K0Z/G7K8xTCtTZnwtjhVI4E0NLX22cCSnFmhpEiUxUY2Ewn2+/Aq7?= =?us-ascii?Q?i8uZpaI8uaZx3fDuyyfk6quMcqQRGgmgocWRGM9FHLZq4Bhwax5QLG7e3jKQ?= =?us-ascii?Q?6GGHztfxV4z7PwwFR5weCcG9n/Sg/qD4IdTHDoBu8056o6qT/LkVD7kr0VGs?= =?us-ascii?Q?ng=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 924d2a97-9ac3-47c3-389c-08dcaa3d85f1 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2024 11:00:39.6259 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: m5jEhnIlxQeuxmKaKZhEjCDfY+h+vAEQtteEqD9t8KcTz2jNycNr+/V23lZeK3aHeBSyF8yLgntJNjtuApEzxU2lvM1TApRiFvZL6fCC/1s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7275 X-OriginatorOrg: intel.com 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 -----Original Message----- From: Richardson, Bruce =20 Sent: Monday, July 22, 2024 11:42 AM To: Medvedkin, Vladimir Cc: dev@dpdk.org; stable@dpdk.org; Stolarchuk, Michael Subject: Re: [PATCH v3 1/3] net/ice: fix possible memory leak On Mon, Jul 22, 2024 at 08:28:34AM +0000, Vladimir Medvedkin wrote: > This patch fixes possible memory leak inside the > ice_hash_parse_raw_pattern() due to the lack of a call to rte_free()=20 > for previously allocated pkt_buf and msk_buf. >=20 > Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow=20 > offloading in RSS") > Cc: stable@dpdk.org >=20 > Reported-by: Michael Theodore Stolarchuk > Signed-off-by: Vladimir Medvedkin > --- > drivers/net/ice/ice_hash.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) >=20 > - if (ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt)) > - return -rte_errno; > + ret =3D ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt); > + if (ret) > + goto free_mem; > =20 > - if (ice_parser_profile_init(&rslt, pkt_buf, msk_buf, > - pkt_len, ICE_BLK_RSS, true, &prof)) > - return -rte_errno; > + ret =3D ice_parser_profile_init(&rslt, pkt_buf, msk_buf, > + pkt_len, ICE_BLK_RSS, true, &prof); > + goto free_mem; Are we not still missing an "if (ret !=3D 0)" here? If so, I can just add on apply. That's correct, will send v4=20 /Bruce