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 45BA2A00BE; Tue, 17 May 2022 02:59:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E950B4068B; Tue, 17 May 2022 02:59:50 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id C6C0940042 for ; Tue, 17 May 2022 02:59:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652749189; x=1684285189; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=LfRVV7XY7HWDirMjMMMBH37UIfVv8fita95yo+Tap9M=; b=YhK/TWvnGvytfljrbou5VtOug/jQ1AZRb1A0vdci0b+s44i1YbiRDWIe PpumLZWiUOOViVy73PmmxkI9uifK5dq8f5zQTuXbAAa0q53tPWVKcHC8d uIsUaWq1yy+Qsc728TTSLKo2u73nHjl5rH5xzdi9jiLpYs+x08t4IPVCR vmBXoNKZWyuD0NDn/nSm8f6Mxs5xFeGep9VT0TvWB+ZMmWuiWF3wuhv2D xE1hJRTGMew13Xn4pfAvqDN+zR537FpzkxTXr0WBPjR5McJQewemtSoKJ 99K1LB2a6B2twfKbSkkOqSr8lQRY35PxDVVKAClyGFMwPeTJ3WzlNkZBu w==; X-IronPort-AV: E=McAfee;i="6400,9594,10349"; a="270952744" X-IronPort-AV: E=Sophos;i="5.91,231,1647327600"; d="scan'208";a="270952744" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2022 17:59:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,231,1647327600"; d="scan'208";a="574273029" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga007.fm.intel.com with ESMTP; 16 May 2022 17:59:47 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 16 May 2022 17:59:47 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 16 May 2022 17:59:47 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 16 May 2022 17:59:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJI3Wxd+cgQON2tGXRGytsX9ZI6mUTDA3rsfQHYJLK/HosOaBnJCRc7Ma3RuX6B8k+JzYQ255ZlzqVWNGhNMmr0JT15aQeJz1whNxhZm+qNXwSSLVLU0tCqIk1g+rcEvoEOL0+xN7LNnIphWrQJ9FkiwqoBXD8FmbTCI0o2EoiD6dvNp3d6jHgeZ2yZtT1EPu+7nJgUdhkYJzax1bFfYopASCe+eh5FUf+s4nqunQfS8RfI4N3APQv5xSbYQobgd4VZ0bKD8V1VQWrteFl9dsYw/ULB/taNCODIX9dQeaMZ0JDAEbNN/4H8VJse008jbae2eah32QNrdqeF4HYeA/Q== 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=LfRVV7XY7HWDirMjMMMBH37UIfVv8fita95yo+Tap9M=; b=QuCVDBUOewkCZMRKygcxEvX/4yJc2OE93/ff/2wzhCNXqbhkQUewbOCl05gV6UEPCBnt2DBTQ0t1DAxqcdCKXXMsc2wnKR+EIr6pT5IZgoXUQd6Zm5oXI7NcNOQtfmw3ivW7Boa6OwmvG6WVMC5a13U9DHfZZ0jqUaoQEYohVQztF9NKsnyngbcW7fiu9qu5q0BxzBW/gZdw3LYYbkdpyj8AqjchUa1gdoDpq1jNsyLAmSSN6Uu4rscCbjaOgVBH3pj2pACVQcnk9UttWup6oO9uddyf7+BSSerwyuLGxz0KjyhsIp0mx33xVkCLfYopoqFW/G4BzIEc/qUy4gecew== 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 DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by BL3PR11MB6532.namprd11.prod.outlook.com (2603:10b6:208:38f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Tue, 17 May 2022 00:59:44 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7%6]) with mapi id 15.20.5250.014; Tue, 17 May 2022 00:59:43 +0000 From: "Zhang, Qi Z" To: "Zhang, Qi Z" , Thomas Monjalon CC: "Wu, Wenjun1" , "dev@dpdk.org" , "Wu, Jingjing" , "Xing, Beilei" Subject: RE: [PATCH v1] net/iavf: fix resource leak issue Thread-Topic: [PATCH v1] net/iavf: fix resource leak issue Thread-Index: AQHYZAuwVaVdh/pZMk2oX19VCKhiva0ZkVRQgACpV4D//5UiAIAA1mAA//+8rICAAOgKgP//jahAAO45GAA= Date: Tue, 17 May 2022 00:59:43 +0000 Message-ID: References: <20220510005425.1648591-1-wenjun1.wu@intel.com> <4349564.Wku2Vz74k6@thomas> <2f3663f9e4bf4c4d9c3993cabe57bcc5@intel.com> <1891945.fIoEIV5pvu@thomas> <4f57fe1f407d4cec8d506fdf3339d645@intel.com> In-Reply-To: <4f57fe1f407d4cec8d506fdf3339d645@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 90e72e74-0955-4435-2140-08da37a087a0 x-ms-traffictypediagnostic: BL3PR11MB6532:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GyivvpMTxydVCVCNa4q9nWx/eeiX8m6a4+npfFPcijc47sYS+w9kUtvIN13uRa0mLd6PszBN1xfTRj6dG7uWJhYhnARzhV3YKNddY6ZZIP8il/2UWnmW7XeKRAVbA3cEGC+JjT/+pjJ88yAo/wPLeI3h9VdGSvFcBkmKs6mYpQQ4o4BRUGToH4cM1yHtECbk54Gjz3ZsWvq8liHaWzeCnVYFZqE/T+29s+1xJcBfQp1pHZ6nDWwN+PQaWtdcMqxSxAtytqnm7JtijV3H0w/AjYFdzbX7xbW2JTmZT4L4c0gq67vpghdGCegkeWmrS0rl9U85lsE97Rjt7GqEEXfSBZ5Bmevr/QR0vdTMDAMMgOYAx1mblqqFqfwznORLIqaCDtXluMo22/GcWfJWb+7GidbOQmCkdMGVXG/H00B8hJJq/ktOZm1zA09DiBtzZ4ZE4wS9Fg+rTHGxILaMsQjDQkhAcZRRDAHRgDoKbGr2dEa2INfPSRuLXRt2VOt7j6qyXggaK1ZNms+pzdQjR+u5OnDSl764QihzNB2/zFDwOsysel6ITPwMLOK5csk2vcaXrxpXfuT/H6LbtQfu7ltEnKQIkzoFStdSsbBqSkdGtXI5vMfvdY0GV1arEknSgI/ghUmjniPeqT/lpKqn6XhECIbdCixKLns+4qOyuYI8FggqNy1xd2iMCv35E9MXDlnQCQxq2vlJog20FuGON7GAnw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(26005)(110136005)(54906003)(82960400001)(9686003)(122000001)(4326008)(107886003)(86362001)(316002)(66946007)(66476007)(38100700002)(33656002)(8936002)(52536014)(508600001)(8676002)(186003)(53546011)(6506007)(71200400001)(64756008)(66556008)(7696005)(2906002)(66446008)(76116006)(38070700005)(83380400001)(5660300002)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kifgRlOfJXHHaY98nd7Lp8M45EegP6yQxUgwrAx8i93N/aXRMslLTEqBExC5?= =?us-ascii?Q?dXotQmCnDdTMMXJ9KlW1StCDBEmThvISq4bybIhi/06lOFVWWB7t7eZdYFJD?= =?us-ascii?Q?sSj5JQR2Wh8c3aOftjZD9D6QaR8VSZse91sv3MbuhuLzW2G0DkgUbbjZA1JD?= =?us-ascii?Q?IoKVOQCI1S9rhOIIhlkmnF46TkQtKp9rQvOndFRsxP7QBuOB3UPg9eFUA7iT?= =?us-ascii?Q?ZwV/waH2++CK6tkUSbATNVkAijB6cZkre/W7OhUCXeD7XVqTytC3R7aQIusj?= =?us-ascii?Q?yjnLKg2+2XdOPeQXLr5+2tJhhl651uRagHzACzx6iyZxFurXMdXU0lx6r7Dq?= =?us-ascii?Q?Lw0E0lqC2xqNkggI2xmDEJjmQmQmQHiWfeFAZ7FiVkRsmm4sFMTkRYy/xoQI?= =?us-ascii?Q?51Codvv4B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4KjRSDWu6KP?= =?us-ascii?Q?LpStDJN2rmgYViNd11AYAUaPunlTGjR0YW6mZNKtMe60yMm45riIiHk0LBQ6?= =?us-ascii?Q?dnlmcCTUXn0MbHk7DjAHPk17hrZmytslrFmuNYDKGWX84M2JDEdfdZWZt5X4?= =?us-ascii?Q?UOnqjVxFSSLjIjG6XrzYrv0wq+yYupThEWnNtOE3SG5Amy5SGjDEIJncQ+J9?= =?us-ascii?Q?f9I5V1Kjudat1vPn6b/2P1LoPGxfM4ovPx1NC14CvRNwncsRX/8g84KMdMad?= =?us-ascii?Q?ezWYUh3FU1DuAqsIr6zKwbBetBANC94rahgDvsEMX3j4YjzTQcdA140UiDiz?= =?us-ascii?Q?aVGMEOxwgm1L3Swu3jylZrVrxSEiAUWctOT4PoVNPNkufRUFq4h8NFGmM8Rd?= =?us-ascii?Q?scdloi6OeHjRq9U2T8JUEpWMYoJu4JpXotFNmEpTrTbCpN6g8TuTBGGKrmVc?= =?us-ascii?Q?UPpkLNOC8Q=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: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90e72e74-0955-4435-2140-08da37a087a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2022 00:59:43.5435 (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: MSZC9y5cI1aMTPhHiTn2FWfYP0pPWAg1yTeS+0x8RxznEio+mN0LS/KlIgjUkn2CZTnwBPPQn8/YjaNa5g3mmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6532 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: Zhang, Qi Z > Sent: Thursday, May 12, 2022 3:21 PM > To: Thomas Monjalon > Cc: Wu, Wenjun1 ; dev@dpdk.org; Wu, Jingjing > ; Xing, Beilei > Subject: RE: [PATCH v1] net/iavf: fix resource leak issue >=20 >=20 >=20 > > -----Original Message----- > > From: Thomas Monjalon > > Sent: Thursday, May 12, 2022 3:07 PM > > To: Zhang, Qi Z > > Cc: Wu, Wenjun1 ; dev@dpdk.org; Wu, Jingjing > > ; Xing, Beilei > > Subject: Re: [PATCH v1] net/iavf: fix resource leak issue > > > > 12/05/2022 02:20, Zhang, Qi Z: > > > > > > > -----Original Message----- > > > > From: Thomas Monjalon > > > > Sent: Thursday, May 12, 2022 5:17 AM > > > > To: Wu, Wenjun1 ; Zhang, Qi Z > > > > > > > > Cc: dev@dpdk.org; Wu, Jingjing ; Xing, > > > > Beilei > > > > Subject: Re: [PATCH v1] net/iavf: fix resource leak issue > > > > > > > > 11/05/2022 17:31, Zhang, Qi Z: > > > > > From: Thomas Monjalon > > > > > > 11/05/2022 13:46, Zhang, Qi Z: > > > > > > > From: Wu, Wenjun1 > > > > > > > > > > > > > > > > This patch fixes resource leak issue reported by coverity. > > > > > > > > > > > > > > > > Coverity issue: 378017 > > > > > > > > Fixes: b14e8a57b9fe ("net/iavf: support quanta size > > > > > > > > configuration") > > > > > > > > > > > > > > > > Signed-off-by: Wenjun Wu > > > > > > > > > > > > > > Acked-by: Qi Zhang > > > > > > > > > > > > > > Applied to dpdk-next-net-intel. > > > > > > > > > > > > In the title, the word "issue" is useless. > > > > > > It would be more interesting to precise where is the leak. > > > > > > > > > > > > > > > > Added below into commit log in dpdk-next-net-intel. > > > > > > > > > > kvlist should be freed before return an error due to invalid quan= ta size. > > > > > > > > It does not explain what is the scenario. What is the impacted feat= ure? > > > > > > I think the scenario has been explained as > > > > > > "kvlist should be freed before return an error due to invalid quanta = size" > > > the impact has been mentioned as "resource leak" I guess this is how > > > Coverity describe the issue > > > > No, it does not say how to reproduce (the scenario). > > We have no idea where it is in the code. >=20 > set an invalid quanta size from devargs will reproduce the issue > > > > Refine the Title / commit log in dpdk-next-net-intel as below to answer Tho= mas's questions net/iavf: fix memory leak issue Set an invalid quanta size from devargs will cause memory leak and this is reported by coverity. The patch fix the issue by correcting the error handle.