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 9D41FA0503; Wed, 18 May 2022 06:55:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E0BD4068B; Wed, 18 May 2022 06:55:59 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 787AA40685 for ; Wed, 18 May 2022 06:55:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652849757; x=1684385757; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=8uxpR3yliY1P9VXbiG9kAP4+f8Da/nyUduuJSvXClz0=; b=RbsrVZTav154lR9zJHHHqxmyLcZf8JUqRhdjzUQWyyfcdITw0zy6ndmZ 9rZoWD07XyNi97eYFChJVRWQDGptXM5Rfs6+74MQ1A3joMyyCwryY2ASp lPpoaz2ggv32rXfOcinb2ALhUzzSrjR6+xcZkDsyOmnsDdZnQsy7O1vqF o6EVNBu1HBNL5AF3Krry0gcB2GzlEVJX52pSH1aA2RwkvOuKZMVXtQ4PI upuXwTDR8EHTJ2GNa6cWKuhRbNMpULCh4gxqfaesqDZ2oXGS+b1JSTw6X sHpj9j6yzslYHmNyxCumkQ5s+oY/waWF2PHFmceV3PlF1hcP2D7ye+pjD w==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="271606875" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="271606875" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 21:55:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="626834728" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga008.fm.intel.com with ESMTP; 17 May 2022 21:55:55 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 17 May 2022 21:55:54 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) 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; Tue, 17 May 2022 21:55:54 -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; Tue, 17 May 2022 21:55:54 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) 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; Tue, 17 May 2022 21:55:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NRahK6wzNOGHgWOehLu9ugWSKvykXJnveOlPsuWMKpj7drJKUxWc6hG85xjCzv6BTPXHNei6HgXGe890hOmeET+nxTJsvg5ggPVTaTMIA/rC8eMW7oEi/VuGot0udxxN3q0U3zz9gzHFAqRu+TY1CINoVRiprhj6p1qPe6M2pGRKVx2/xuL75bI28W8Z9q4tN8Ffrhjvsdc8Bjy2wFRSrnSVKhJ38Hg9igRyohxVcHpDyUkDTeSec1KhnnucSwzftnrT3kRs3oV6eCeg5kFcZPZRaw3RlUyxbnJwOQifRbVZMFuLRoo6jGZhsvMyvEefJjR9sH7PCBcgNMOhtbBALg== 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=8uxpR3yliY1P9VXbiG9kAP4+f8Da/nyUduuJSvXClz0=; b=bqOZFZd5KMEOozc0LXge/+Lz4W8hm0wv2RMw2oxWDsgTEyabS8MmLbvk9E3CRO6dbRqV3AGWa88X8EUe4yW3TkEtqb/Xx39ZW+iZ78hWs229ji4uhbd6JqwKjIsbxnFwMhVh3AYdCUUGFbxYixEf3prZ700tnahZh+Eb9Hr5Hyrg4cC4xMILnYzIhnZiWXroRSOnX+nc2kMyWXsNPs/JtfktzCkKLYB0J3HnebkwjlH2BaIg+Cr0gp04S1chsvfEsuHVXFm4bERrgdomZDPse6DIvn//LHVRAxJgwF71Co5AiMtSbf6q5P+xPsV7IKjcpK3+LEqkkPmHXu5mnY0Vtg== 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 PH7PR11MB5982.namprd11.prod.outlook.com (2603:10b6:510:1e1::20) by MN2PR11MB4365.namprd11.prod.outlook.com (2603:10b6:208:18d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.17; Wed, 18 May 2022 04:55:52 +0000 Received: from PH7PR11MB5982.namprd11.prod.outlook.com ([fe80::317e:73cc:d3fc:4fac]) by PH7PR11MB5982.namprd11.prod.outlook.com ([fe80::317e:73cc:d3fc:4fac%3]) with mapi id 15.20.5273.014; Wed, 18 May 2022 04:55:52 +0000 From: "Zhang, Qi Z" To: 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//jahAAO45GAAADFqCgAAuMYlQ Date: Wed, 18 May 2022 04:55:52 +0000 Message-ID: References: <20220510005425.1648591-1-wenjun1.wu@intel.com> <4f57fe1f407d4cec8d506fdf3339d645@intel.com> <3000980.U7HbjWM52l@thomas> In-Reply-To: <3000980.U7HbjWM52l@thomas> 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: e65e3b17-f46a-414e-119f-08da388aaf3d x-ms-traffictypediagnostic: MN2PR11MB4365: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: xAKdYoJJmadWwgiWbYpK5fMJ/oAzoZX3kwhJE5G1D/6Kl16OCzKQR0Hwb85BNiQW6AeR1w4aBcLX2VLGmQiT7Y29JegUB8J+QS5cBhVIdLejXN6qLLjVNYjWj8iMK+JFro79EjIWyg9BZVIF14QocS6AkLn+NJXM6ru4aQdBj2+zqW43spETQiks9xrncbkUekMYDpx+lKk7X9AzfQSWN024ZIPRDnXhVr2LfoE5vF5GLvtmg3wuFvRkz0XfcJR+XDv7g/0HorxjeYoHS2jEExXRs63kW1Kdk2HFTOzjfWCtWl7eBwJyPvPAzYccGQF/ErDIeJmSWgYOfPx5ZwrbAxHFk5+KSWR4ET8lybSHgpXIDn6DckLlWjIaGck9HxqKa9p/VX7de5pFKB64vjsSTfrDuDDcK08m7BIT9/jyegD6FAbklitffiAKcmm3hYSFVdIkSSlepxsXeObDE7K3FhCJbjaX3GdzRIrkHkLVbzmkltOJQwT6UOllenP0zsrn2BcJ9TM4w8U8YKwoC50+FkTwfcqgTAxQYVTt/VVsza3sRwTUPAlw6DDeicSTLRLR1VNsRtiaICKZpKTpjrLaaLRqCtpUrGORAb/EnAJWaTIlvdUCOjmqcRR3EEYnIcsSnQgQeIOZDtmSWAUrqBfRCRR3vtf6r0uYeWuXIH+SHIVrt9npUyrf51+K6LEJm5xyWYloMDlWfs6NeWHugSxUPg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB5982.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(7696005)(107886003)(52536014)(186003)(5660300002)(8936002)(66476007)(66556008)(4326008)(64756008)(38100700002)(66446008)(76116006)(8676002)(55016003)(38070700005)(6506007)(66946007)(71200400001)(122000001)(9686003)(2906002)(6916009)(316002)(54906003)(86362001)(508600001)(82960400001)(33656002)(26005)(53546011)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ypk5lJTx3vH3JoKaDbN+LINz3QLSoye6sn1cVI41qWM9IYLc+qxrr2sJ6VMH?= =?us-ascii?Q?UY6FJIMBsMPKFbLB0je3mBSMgKSeflNoRTOjHCPSb5hgsgVaYujbP5IDloHU?= =?us-ascii?Q?aV1MkF5kLpfsN75QlIFKB63IXfnN0FNSP/MluqElFXxksFxmkFkOXd//syRs?= =?us-ascii?Q?CNgi0KhkQEDRujgcTVFejGjnc1ncD0cPjQcEq2rubhSwQBkYmxtcEkaK1Q8c?= =?us-ascii?Q?QlnTK6k3VFh/BtyHk2jg2nRkI23m50E7JHLkqSWXQLgvWFkWdSoxn0tP3crN?= =?us-ascii?Q?XlMgAORtyDrK1QXPMAsFNhjFB31xM4A62/WiE2fPp3rz8eZOTrTo8tJ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deIbQ/LI2wIQGikDHn+cAn5y/Y?= =?us-ascii?Q?LWi3iu5yWcuQN+wlaH8dDTyZpoihO7BJ8thJo/PskpDcHWEA7IgrgErWYiPL?= =?us-ascii?Q?FyjGi056t4LIbcybveTJVVey+iDj7s2iVIJXmKIFKgWYIWfeQbbYAMultd1G?= =?us-ascii?Q?N71ORbfb56tbW6C2+NGzpm6qHaldCrdRAB44lnOhS7T4EV1xcoagvSrsCSwc?= =?us-ascii?Q?S2LDpPXjKo4XubGsa9136FnI5QQZ+TPSCHvRaUGAFhm2Op09Fr9nwTM7SVZT?= =?us-ascii?Q?N0+uTpD52DFA0sJKC7seUlmSDKtjZTA+XRw+1mr3DbC+GCMzbJqttbuvTpgw?= =?us-ascii?Q?GEToNLR0J7AUY4VZj4tyqzXsYDFg+qys68z/YJvtCILYU49vc64bCxulQeC4?= =?us-ascii?Q?uK4yJG/1ZvhUeWhHYzTQ26DqH0xZbe93vfTUhWnEN8wIr2MeKMzJ+LCeAZXs?= =?us-ascii?Q?lnUQRJBU/CwRCiRQAVXOkemPJxZmEDso6SAKNLyqxtzSf34aAlfFupY80ZEQ?= =?us-ascii?Q?ejbheey2Jg=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: PH7PR11MB5982.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e65e3b17-f46a-414e-119f-08da388aaf3d X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2022 04:55:52.2535 (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: 4AD0G4IMefCMQc/Jt+JVtSabYvDUwPY9d3iShW5Pfn34Wa16//MU6WO1ldNQyWX+7n+yV4LnnryLvpatuK3dRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4365 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: Thomas Monjalon > Sent: Tuesday, May 17, 2022 2:52 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 >=20 > 17/05/2022 02:59, Zhang, Qi Z: > > From: Zhang, Qi Z > > > From: Thomas Monjalon > > > > 12/05/2022 02:20, Zhang, Qi Z: > > > > > From: Thomas Monjalon > > > > > > 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 coveri= ty. > > > > > > > > > > > > > > > > > > > > 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 = quanta > size. > > > > > > > > > > > > It does not explain what is the scenario. What is the impacted = feature? > > > > > > > > > > I think the scenario has been explained as > > > > > > > > > > "kvlist should be freed before return an error due to invalid qua= nta 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. > > > > > > 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 Thomas's questions > > > > net/iavf: fix memory leak issue >=20 > A memory leak is an issue for sure, so no need to add "issue". >=20 > > Set an invalid quanta size from devargs will cause memory leak and > > this >=20 > Set -> Setting >=20 > > is reported by coverity. > > > > The patch fix the issue by correcting the error handle. >=20 > handle -> handling >=20 > Thanks >=20 Ok fixed grammar in dpdk-next-net-intel as suggested.