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 DFAB84257B; Tue, 12 Sep 2023 11:07:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5F03402AC; Tue, 12 Sep 2023 11:07:39 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id C0EBC40293 for ; Tue, 12 Sep 2023 11:07:37 +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=QcAy2s2G9ab9z1S4NV61i+RmZaLIRggt7C5Lhblo/Ks=; b=MAsSAn92wWAR08kzyJ1X4PfW/v4YeCBPKrcCMvT+QiKX1VDFnoN4UtEy YCe+1AT9nLZm0uALIKWZ+UcxB8XVcKyfcex0KrS+IHUjRMABgQ1m1TKb2 4uKTYIFK2hTspm8Ujq8CCXD60EYsBkRTGZEKZqrkpC5vixxBJafnUprkY BplTkp+/KTSTro98oOIw8W3qLKLCCERlxz0Xnl09C8GFKOguOGbRl6k01 Qnu/aI5w7V2C32IWB2GHqylfGa0oFhMBTdgouq0+vn2FyOfJWqeRIaWwk jhlSLR4ORWpxev3HIXhBrp0iB4w1VTevfs9qs5RKF/PZViraS/iUWjHMW g==; X-IronPort-AV: E=McAfee;i="6600,9927,10830"; a="442334889" X-IronPort-AV: E=Sophos;i="6.02,245,1688454000"; d="scan'208";a="442334889" 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="737067781" X-IronPort-AV: E=Sophos;i="6.02,245,1688454000"; d="scan'208";a="737067781" 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 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.32; Tue, 12 Sep 2023 02:07:36 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.32; Tue, 12 Sep 2023 02:07:36 -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:36 -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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TDMcLgyq5EoFunDLcCUwQtTCZbHHpHrB7AaSj1m0mDP1he1V6/Uo9Wc1yTqDdyl9q7VUApQk4VGkXULVGy09ALUK6OvQN2FgDylBWeg9unhwFTk76i/CzYOr2b1h/Y1Yc6Uwc9VEhj6eGisFaczoGMLu6AP1GoLq9HGob5LqUeOPJZEZeBwndVJvI72Edl6mVh5BNSCHjRVtXSDqxrxN5hHRc7183tQRY1jgt+sJA1u1w6UqEMdAe8WaedV5hc/0LJOIK30Hh9F3/Ra8VOAhzKuYE0GzpogIHV7vgkMlKnt3KaCguRbLWV4A/GyTMzdEc/iWqopkFKMqiGV4u1xkSg== 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=QcAy2s2G9ab9z1S4NV61i+RmZaLIRggt7C5Lhblo/Ks=; b=SzanoBBUMjYYAOQgNAzGtzk813qclTlaFfqHyVOBTu1sSB8agkosCwzrjTQf39Cdrj+dVST8xD9bLF1zfuTjUKhwZ/D1o3EBIUi1yGwREF8mcXYlq1Fkicyi7Wd6B+A7i/ObXIC4Ne6wuU0TCyNdA0jX1q/LowyPlDzMLTN/Rik/BJmRjY3l1lG1mwwrBv1X/AitI+EDMURsTNUzQLKu9KhHtnqXHUYgziDLzufjuf5o59zfQCjz7xzZZteI5WVbhIY+qd/D7VK/O5ZyZK8/zNsf822gBGx8SS/u8n8m0gaSwy+JeRQqWBRgp9Y9Dy1RezqbjchKU/SpqibjhMqmhQ== 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 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?wEUQYYHbF6cVNRfeRdnh9nSz8IFwKV2EaS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5flHOEhjtp5s77eqeksxg4nPdov9BeKLj+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?= 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: 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 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: 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 >=20 > 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. >=20 > This patch fixes the issue by matching the devargs when inserting a devic= e in > secondary process. >=20 > Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct") > Fixes: a16040453968 ("eal: extract vdev infra") > Cc: stable@dpdk.org >=20 > Signed-off-by: Mingjin Ye > --- Tested-by: Wei Ling