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 2F38443352 for ; Fri, 17 Nov 2023 11:29:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2677C40EDC; Fri, 17 Nov 2023 11:29:12 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 5DAD840648; Fri, 17 Nov 2023 11:29:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700216949; x=1731752949; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+T4wsA00XS7eSzQxalwK0SYhXlGMMKguT0EVjbLO/Rg=; b=lywkj6Ov99NqRpn3sFzZogrtGlRYYWYde65d2GXVTu/oJP3xrLKhlir+ 5hGw/y9X/jaqCZ4F3geKIYYXxuIzu4LFRz/YrJnnMi9gGK1FfVl0RYjvu wD5IA4oRDFwy2lAQNj6t1h11gmXdK127rlKB3inBFhVZUiDL8d2aAQowJ UoFVSvYE+VbInXCdlwKE1Mo6b33htQjCRWuLtywifEcSMw9MTXk589kfz P6zErpbohEhIKbd232VE7DCuZOFBTdL0O1Xfb/WdizNvRXWp0gj1Zg273 V6yXMGnvnkmkClJVDhHpHG22iOgmxNv82eYAzMrpfHrvjrswpFiiIe2tG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="477491962" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="477491962" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 02:29:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="1012893365" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="1012893365" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Nov 2023 02:29:08 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 17 Nov 2023 02:29:07 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 17 Nov 2023 02:29:07 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Fri, 17 Nov 2023 02:29:07 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.41) 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.34; Fri, 17 Nov 2023 02:29:07 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ladq8bGLhWfDPuYcEc9dfF/Ybz2GAduA7NbBYFZBtRNyEFBG/23tk/VezK67M9ZjPL59JgFdYeW478uO+jgfjGsHx54ArRI+PoVCB4+SsowSpefVczj7S9F8DvhptYud5FK5m01I7XVqdRYyIvUfZW0hmGBUESS+jpmN1G3FYs6PLWR0yJWWrDLGLAOsMUQ+28+v2b7mx4bXgm4KbyYiEOvZlbgPzYNMY/K9+N9M/FSQCPcolewSSLpARCJIKaHEkp4JA1FJbRFMv1gQY7vPey0kbP0pUfsUVPFG76ifO961zkOp8m8885iTp6setlVNmDNSJ0pNdIA+y2lhCUQ05A== 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=+T4wsA00XS7eSzQxalwK0SYhXlGMMKguT0EVjbLO/Rg=; b=BWs0ykJn/vnOfxAwEoFG3yTihkxE7u4IWy0Glv9pJrQBZjcSmyCD6qFra+mbLcc4gSPCIIrqIRK0O5ivSEg04GUewVrrU2iZ8ykR5v59nuYPH2y/XidzMjLetd6K6OJJcwmd8YXjtEmVcvLA/IIbibM/mB6JxQraWPQXJeUMVc0tIMvBZ0v0Wk61Mi4jkrbXB3FbWZVP2ZhS29xGwj7nqzGf5sNaRazHLDTU0po/cyZZl3Q8GY47QowpEInsd9uLzJBVTIfF5pyvrmzbgAfSlnGrRu0bJRV7wYciMtB9cQINPzV8BwqzTOmLKDBwSA6YUJs6vjQF/Q/RiV2m6pLabg== 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 SN7PR11MB7139.namprd11.prod.outlook.com (2603:10b6:806:2a2::14) by CH0PR11MB5706.namprd11.prod.outlook.com (2603:10b6:610:ed::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.23; Fri, 17 Nov 2023 10:29:00 +0000 Received: from SN7PR11MB7139.namprd11.prod.outlook.com ([fe80::5216:6b58:10e7:9875]) by SN7PR11MB7139.namprd11.prod.outlook.com ([fe80::5216:6b58:10e7:9875%7]) with mapi id 15.20.6977.032; Fri, 17 Nov 2023 10:29:00 +0000 From: "Ye, MingjinX" To: "Ye, MingjinX" , "Burakov, Anatoly" , "dev@dpdk.org" CC: "Yang, Qiming" , "Zhou, YidingX" , "stable@dpdk.org" , "Ling, WeiX" Subject: RE: [PATCH] bus/vdev: fix devargs memory leak Thread-Topic: [PATCH] bus/vdev: fix devargs memory leak Thread-Index: AQHZ3KbeijggetUpAkiI6S6QGkb9G7AW99OAgASxV0CAYx7CUA== Date: Fri, 17 Nov 2023 10:29:00 +0000 Message-ID: References: <20230901072409.741847-1-mingjinx.ye@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: SN7PR11MB7139:EE_|CH0PR11MB5706:EE_ x-ms-office365-filtering-correlation-id: 91ac25da-db46-4584-ea19-08dbe7580341 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sPq+VBvqv2+ezHrP5046B0Qa/hs4/DtfPGu0gzBLGAyj7+bbPX6mH9o973WQZJJj290iuR33KVrpwxxuviY3M0pFovfsms2SAxSMjg+sLZXy9gl0c9/cCaU+RmeXefBuHVDeSWMA2Aloo4ezTyaCAGdY977qic0gPjEGw14xcbcG2OKp1xt4EoOtjFVQu3mE4l/J4y9EL2QDrXPMv1S7pImJmWeCEHf4GTuqH/p/QhAiXH+Bj8n7kXkCdqI3DKIybOu+3PvQinHKm1PMJ9fCgNgMLaykOxonDcSkZwg1KQ1yU2tteoMJ9bOcM/eQt2Re76Lz2MbXGVrxXqnxcofEVThrh2Wge+ezQU0dVpKt3NDcP0vDiA6XNa503tbCfslav3IDuXLYl/0ylbgcpS7lu1/CckM/nzGgs6xh/GykhSnFGo7UFuHfn7ajYlW9TxCgHhPxLdrpSGhHh2iV9E9KI84SH80RXP5JwGr6d0rmLXLXwymel3YqMiIwFONU9MHvxQuSadcU1gI+c4XDvJudL3E+OwgditBnkQoJeclpt1v5hY33EfNgCyWmilk0eruZFJ0avYu1JlFGbWzlPS4t9zn8sWdDaGHvh6z18x2zoBFxWrty+EsWL6p7z0vkjUfJ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7139.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(346002)(39860400002)(376002)(136003)(366004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(122000001)(9686003)(71200400001)(86362001)(450100002)(2906002)(478600001)(33656002)(38070700009)(82960400001)(53546011)(5660300002)(6506007)(7696005)(41300700001)(26005)(316002)(8936002)(8676002)(4326008)(52536014)(55016003)(76116006)(66946007)(38100700002)(83380400001)(110136005)(107886003)(64756008)(54906003)(66556008)(66446008)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?iXXE/XjqgXMaqncINl+sjFSL+e8UfCrMmRCisOFnnnGBsuo3s2DD5+p+6T8K?= =?us-ascii?Q?glSEcssYCPZpbxyljyZWeUO3t5AsDWur+8HPV89hIv/Et+34UtXwodUoDbeB?= =?us-ascii?Q?6DnFqbyRY40N8OXd+6ytXE21PQig9A3ZMvKlV1mBeIbVZuNxtgIHf1QT++5c?= =?us-ascii?Q?p4rnUAYI3hJrktOqXRi4Vl6H5JnvAy2k8JGWpYXLo+Or53fEDJfjwaE0yKn8?= =?us-ascii?Q?Z54ko1iwuC5M+N0Blb1ULmedGjiyY3LFl9FV7W8gtmj8OHhYz0GN4xoc2WM4?= =?us-ascii?Q?SiMlNe2x+x7TYSLvDvwoQAPgEr0VR2ua+8do0Q3JLlthH9QCsQCFQa1LDgiL?= =?us-ascii?Q?6FMGagFTct5TRpt1I5LsBnWYMkei5kWaNFkvo8lITMe77V4lMWYoykmJ2lZR?= =?us-ascii?Q?tMVq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1Ui4E79x1AT?= =?us-ascii?Q?P9J5LiovYhOHm/DXl87Do3MyAYVS9jKvZKULMt69lGMf5d4n5AI5vfPUzPfG?= =?us-ascii?Q?cn+yZSdznPbv13CwC/bUfDGs99A77smaKObPONP6xsY+tte0BoRz6kHa7uu3?= =?us-ascii?Q?KJxz898TNMdLQ8Dqmxyxs7mJGMEqJ2ZWmM0I6sEnVGfP/s57CVTBB+Yvv4xV?= =?us-ascii?Q?yB4tf53Qa/HxygnPEDMmxHeqRqJAsreu6eDDg4EuuWiMvEod5xjDF0LLwWra?= =?us-ascii?Q?4j1KTAXcMzz+fgYAzo3Fj8Gcu1aBEzhincIh88+0?= 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: SN7PR11MB7139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91ac25da-db46-4584-ea19-08dbe7580341 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2023 10:29:00.0473 (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: V9ewDD1/Cv9W5EACRMfbdhT36X6IGxegLk3YdBJXKRuNU32HbIpwisA23AI3XW3j52XcicN7iLHIA8YmWxvLGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5706 X-OriginatorOrg: intel.com 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 Hi Burakov, can you please take a look at this patch. Thanks, Mingjin > > -----Original Message----- > > From: Ling, WeiX > > Sent: Tuesday, September 12, 2023 5:08 PM > > To: Ye, MingjinX ; dev@dpdk.org > > Cc: Yang, Qiming ; Zhou, YidingX > > ; Ye, MingjinX ; > > stable@dpdk.org; Burakov, Anatoly > > Subject: RE: [PATCH] bus/vdev: fix devargs memory leak > > > > > -----Original Message----- > > > From: Mingjin Ye > > > Sent: Friday, September 1, 2023 3:24 PM > > > To: dev@dpdk.org > > > Cc: Yang, Qiming ; Zhou, YidingX > > > ; Ye, MingjinX ; > > > stable@dpdk.org; Burakov, Anatoly > > > Subject: [PATCH] bus/vdev: fix devargs memory leak > > > > > > When a device is created by a secondary process, an empty devargs is > > > temporarily generated and bound to it. This causes the device to not > > > be associated with the correct devargs, and the empty devargs are > > > not released when the resource is freed. > > > > > > This patch fixes the issue by matching the devargs when inserting a > > > device in secondary process. > > > > > > Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct") > > > Fixes: a16040453968 ("eal: extract vdev infra") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Mingjin Ye > > > --- > > > > Tested-by: Wei Ling