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 52C414257B for ; Tue, 12 Sep 2023 11:07:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B3E4402E5; Tue, 12 Sep 2023 11:07:38 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 01F6840293 for ; Tue, 12 Sep 2023 11:07:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694509657; x=1726045657; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+VjNfSg8wwNI4EN+n/c5kbQTNdIJwbqUI7NtyFr0nvw=; b=F5mHIkDKtuY514A/rtmMvw4aDEKJORIbnG+OgZxVr3D+orkl8UweSSBT JBfnTtO/Va34Vc2zVisdwSU60Obes8+eD1096P95BXHr535kCCmlP+UIX gE4mZs2WnnNs20FWJ2McZZpaKqi/G9Uety2GFLFyFBqD6GFOd1vNnXnry NrbRXh+E+DJhKYdF/rzAl2vr1XjCTsg/YnSGyyxk/AjmE81xRx+/sZSDK oJSyxzfPNgFBoL0dUA+tkmFv9Kb7pv7nyQqx/FmYNB0VK567rKq8WqL06 9LpimiVS3WVKjZhrG58Ct/qmrtoODnrIVmYEYbqnH7rhNkSpFCmwznH5h g==; X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="442334884" X-IronPort-AV: E=Sophos;i="6.02,245,1688454000"; d="scan'208";a="442334884" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Sep 2023 02:07:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="737067777" X-IronPort-AV: E=Sophos;i="6.02,245,1688454000"; d="scan'208";a="737067777" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Sep 2023 02:07:36 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.32; Tue, 12 Sep 2023 02:07:35 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.32; Tue, 12 Sep 2023 02:07:35 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.32 via Frontend Transport; Tue, 12 Sep 2023 02:07:35 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.47) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 12 Sep 2023 02:07:35 -0700 Received: from PH7PR11MB6006.namprd11.prod.outlook.com (2603:10b6:510:1e1::13) by DM4PR11MB5422.namprd11.prod.outlook.com (2603:10b6:5:399::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.37; Tue, 12 Sep 2023 09:07:33 +0000 Received: from PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::9ed9:cef8:50f6:be1c]) by PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::9ed9:cef8:50f6:be1c%6]) with mapi id 15.20.6768.029; Tue, 12 Sep 2023 09:07:33 +0000 From: "Ling, WeiX" 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 Thread-Topic: [PATCH] bus/vdev: fix devargs memory leak Thread-Index: AQHZ3Kbq1AgKXuQaX0GQhAcB/w/YCLAW96Lw Date: Tue, 12 Sep 2023 09:07:33 +0000 Message-ID: References: <20230901072409.741847-1-mingjinx.ye@intel.com> In-Reply-To: <20230901072409.741847-1-mingjinx.ye@intel.com> Accept-Language: zh-CN, 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: PH7PR11MB6006:EE_|DM4PR11MB5422:EE_ x-ms-office365-filtering-correlation-id: 0092e227-f43d-4459-0e07-08dbb36fb332 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NJ5fSWNdrggOv7aSqxHHBy4v/HlbTCX9LsoTOwgb+rCAkstUuuqkOQ98OLNhOicVPs4Q/f+Z8nQULuiYhfoclb/1CACb1RWRzOqbezVeB5XfQYiDv5xtQ/jbhAFVNV17M1Esa9dvd4hxB4F6qefQvBAfEGtjaFaW4uJsX2SQLgL1kdKaTEFTAg9rp7vEuKkKLEvKHnUFwgqJQDOhcdS2lmGuQAnDDAO6ic2lSxJsAB0LliwcYJmcuD8VSvBTRANwIiYQvz+/HhV6gmX1LjjuCBtCdz8eqZ8GJ8qAKnV4olbCL14P7q3lVIabFGVncUgA6uAAgkCdCPnd26ecF4V8zb4xY8hUL4dQJUlCNHu6ULd968j8gkaCvWDW5Ubo0x25K3S9YbZq1ATwLLpvr83lL5T9il0GuCpE2vCNLyMl0w1oOgwX34nisgPJZheOEHpj9jupuANFVYmgpm/b35ko751KpKUJjBlP2bGyTIf4DmFC2qF0bSZnrfERq1iJe6B/W2iLhp1cU0xAsBSL1yC6iUTPhi6gTdge55+d39Omu/WXNjlDkfuZX1PaO9X5uaFBg5QARg0zIjct57FGGorDkNHR1G/eY6gMNES21crTuQpXYtSpJx2b729yiPuw98uS x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6006.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(39860400002)(346002)(366004)(376002)(1800799009)(451199024)(186009)(26005)(107886003)(5660300002)(52536014)(8676002)(8936002)(4326008)(9686003)(53546011)(6506007)(7696005)(71200400001)(83380400001)(55016003)(478600001)(122000001)(76116006)(316002)(66946007)(54906003)(110136005)(66476007)(41300700001)(66446008)(66556008)(64756008)(86362001)(2906002)(4744005)(33656002)(450100002)(38100700002)(82960400001)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9IO2cWGt0M2y9r20PsXR22tDNTfajP7b8Uc1p853kBQFg8B11+KqZoy6C5ZB?= =?us-ascii?Q?Tdp026S8UlrsjNpcDEgjKby41g1glkT+6ay69A8oK8EOR6OSYVy+UUClldiM?= =?us-ascii?Q?7tdMwLORmy/C59UvJiMs4LgqNtXZB6ZgT6BL22iTuErsdVUhwqdC1Xf9f4SE?= =?us-ascii?Q?Q64scqsNx/6yJQj8nS+cWuAHI5hLMwq4IB6Ujg7VHyJI0DoB4LRQhMpmjZV/?= =?us-ascii?Q?V+mnjqGXHdEC+lqzMx+ImI10ZZOjXCCkyG+VFQULP33tbl8eK7j3vmK7wzOs?= =?us-ascii?Q?SVqOQv2kkCsHtc6cEuxBRYsgw2wFv/2Wza6MYdqx78WIXY5LNWU5kQBChbV6?= =?us-ascii?Q?wEUQYYHbF6cVNRfe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ivdwn?= =?us-ascii?Q?m5flHOEhjtp5s77eqeksxg4nPdov9BeKLj+TclvUDGR7q9ASp19h3fpJzuVI?= =?us-ascii?Q?GVMREYiOh1M15izGqFHLLLtbnIUJwB+FgMMuaryG7ZmBjthp4Hx345XmPaqh?= =?us-ascii?Q?hcEII56tzX55GRR4FeXu9l0kOFZTLn/sf/Behqn/D1OO0Ewcs0ukWzzaBdvS?= =?us-ascii?Q?FFRDqPAT8ZJ4mi5ZsZxloJdOFrpBrzaHUopD/Ah21sG830Xmc7HImJc6+uMG?= =?us-ascii?Q?js0h0rbex4Q7tsS9vJvZfQZRGacRQDI3ATdXQm4dBf7wIo/He21SOIK+UE82?= =?us-ascii?Q?y3wM4xsqoDm3VSti37k=3D?= arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CyH5Jdbf9sIkQFeU3nKSU+rz8SeCxZpsBSslqyLfLhFvzJKdpWzdcCZmzKIxDX9+svEjmmNsxD62HUg81S12rTs6diZGY+v5jupgwmn2CRkLVVJCReE9sO026esCaMunXE8p1sOMRC/sH4FssmgSeJPdZD734yWl63dIw7n1gvwSeBOxN42nkNxaIrQsL0pdrKLY2Sl0s0GWDtKNCdlNaWSJPUhvovOnLzsyOMBt4ZOPNP6XPYF3yOO3DmVq6rUgmCvFyFYPj3XMXOx97V7Qe+KR9kwA78/XECYCDHG7NYM+nKY9dltkiuq/rELwyVkmYR71bd3YHW/2y1syJRtsbA== 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=tNy5Q+tHPyy/E2y1OX4RkLpTC3C25CwAtP34e+GdSbM=; b=Lw6hkCq/o9rgnTNIeNvvo22ROTnyEtZNhYDJG4Cx913WwEhcjshU0Bq7S0TPZNdncuUaiYZ+Y8uqT5bt3DbGb5blgFqaAE2e2tsRj+joIZCB7QDGlnVhrLGscQlwkDHyXWDDONSCJXeSBQga0NwlVR5R8N5mpcj47mYOs+UBD/WfbasvjW9+9/8rya8iXmf8Lcqzn5lNqHhm+n57Y6HNp6awnTjdJwOPA58ZamOJcer5V8AV+Hnei48cUA7Eh1JpZHrsNEKbrBixG09VhjbEB4q+n6OqVUUQx+A77//FF2GDD/6+ohSog8E6OQuX5rwvQbpV52Ee6k9j3Go9txxuzQ== 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 x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: PH7PR11MB6006.namprd11.prod.outlook.com x-ms-exchange-crosstenant-network-message-id: 0092e227-f43d-4459-0e07-08dbb36fb332 x-ms-exchange-crosstenant-originalarrivaltime: 12 Sep 2023 09:07:33.1634 (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: Ficw7+5AyIgFTYrepNtEQsNwhx9NE1xo2ivLF5MB4L9/E8Ab3IKVBEMBLrOAMXFhIXjL+xIDcDShhzawgSLaFQ== x-ms-exchange-transport-crosstenantheadersstamped: DM4PR11MB5422 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 > -----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 releas= ed > when the resource is freed. > > This patch fixes the issue by matching the devargs when inserting a devic= e 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