Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B951A606A31C for ; Mon, 30 Nov 2026 15:11:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=ripSMh4v Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58A1510F151; Mon, 30 Nov 2026 15:11:37 +0000 (UTC) Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azon11012059.outbound.protection.outlook.com [52.101.48.59]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF7F610F151; Mon, 30 Nov 2026 15:11:30 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vfXxBRLDjdBTK2CrJWliotYNNvNsJmKkJKWTCOncpWJtgSPtgGP/DSX+BpeZvQIaiw3bvTorf9loNtAzzqQxX7vDl3Vls4NkiiY0TQ8UefgXc3JH13sn6dq8Q39egHNMP7siltpYXGuaRrNz6vZWmQ6xb0MELsI2Xz1KThEaQLOXnrwb559bZWTw8DyBUH2KCAv3kROlNnzQIuVXDEUvosom+NmiV30SgymTxt/pAVrZp11vUC8canwqYtvvsgtnEly98tJ1ypUX4gspF0fh4wztzYjYVJN/hXbNSdaBabjO5yFb57IP5idQsWfW6ZjOP+LzdMouyvKF6wvo6X601w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=bg4ydjkavNGD+I4GFkN4y7sVUNFY3yuLI/08tQvG/iA=; b=HaExHvgu6Pz+RYmQuWdOrPE1lcRXd8F1XPHU951uKnc9hsjiJCYiAeAUF5bVeoiHR5EiVjUlNPunPTgGRCVU1eFhqe9Mqg3yxyN7Zpp2i1snpeY/TEcoK5pChPGbumNQUlYm0khi2SbvAQWFK6hxpOMgoGp3ORbksMyPbw8PQsNdb/K3LTOhNFfMFqfV9H7xjTfunul2IroKO+HOJl03UivrpmdO5KReNCaiFFB0fAP9cz4hM+HpO5pkpDtK9U0tmYmdwSTzvqaSGm/EZl3pXE0VJ9E4J417sPo0ro/TWEZAA9yro6KpYYS0pCqKvQfmi2h+CSh96X6HhUh5zDYZ9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bg4ydjkavNGD+I4GFkN4y7sVUNFY3yuLI/08tQvG/iA=; b=ripSMh4vmNIuHR3GWWaQbwCc29VyiFcDP2ulhj/OfElk/30miENMyG/WKx0B7Eo9e1Aatcd/eJB29ZEq6TipRdDW8mGbgQsf/TMGtXpvqWZbk5mHIiZUDQhWj/7xHYPyfpQ7zl+RnBk9fjRPGOiRMbYu95Msj9PwAOF1J5vRbbw= Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5167.namprd12.prod.outlook.com (2603:10b6:5:396::10) by IA1PR12MB8336.namprd12.prod.outlook.com (2603:10b6:208:3fc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.13; Mon, 30 Nov 2026 15:11:25 +0000 Received: from DM4PR12MB5167.namprd12.prod.outlook.com ([fe80::4588:54c1:bc29:2c7c]) by DM4PR12MB5167.namprd12.prod.outlook.com ([fe80::4588:54c1:bc29:2c7c%3]) with mapi id 15.21.0662.012; Mon, 30 Nov 2026 15:11:25 +0000 Content-Type: multipart/alternative; boundary="------------67MLphrreCSwTYiX90DaR6Gd" Message-ID: Date: Mon, 30 Nov 2026 10:11:23 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [RESEND PATCH] drm/amdgpu: Unwind UALink peer GART mappings on sw_init failure To: Lin Huiyi , alexander.deucher@amd.com, christian.koenig@amd.com Cc: airlied@gmail.com, simona@ffwll.ch, Philip.Yang@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: Content-Language: en-US From: Philip Yang In-Reply-To: X-ClientProxiedBy: YQBPR0101CA0342.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:6b::12) To DM4PR12MB5167.namprd12.prod.outlook.com (2603:10b6:5:396::10) X-Archived-By: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5167:EE_|IA1PR12MB8336:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d62a420-9618-4db8-2209-08df4ef43339 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|23010399003|1800799024|376014|10067099003|56012099006|261026121527099003|261026140227099003|261028144727099003|261022105027099003|261021123027099003|261021121427099003|261102123227099003|261009223027099003|22082099003|18002099003|11063799006|6133799003|13003099007|8096899003; X-Microsoft-Antispam-Message-Info: 0oWlUe+6syULacmS5wQITtaabXc3+zVVWw+p5C9Wk1L1eulhwdLKJsqNN32qPcfXzW/R2vnv9+qrh5xPC5FQrVvOWW/Ai+z+NP4MG7wKAEsRTrEEm3dqQbisb+ENNtbKu3wQREUOpZT8ssdEA7bx/UlgT4TDd9dQTqcvgVt9toBYe0gHcBbRdyJWxjhP4B/tkqonckmrN7laj4q3/5kWx7HLDD4OP0j+9iMZpqMUG01OdVYWabfefZ/NxXA1MV0ldfjpnhTci43MUK+BZ85Sc5SgE6TRiieJJzpvSVAZWLhjzquApB0ZGKmUxqiZ8lcpLbUgo38u4nmgn2un5/y8iAHjIWUG9Lcn+rMDqA70J24gA/yaibJZO1JyVC05oZ2BlBaWldb2Z5YEKIz8xuIaBQ5+euRYGLzkOgiZpD2z19Hlqdjm2aQVVJwWl4eBvrAX05eQr1Xjh3lwCjvesiykopuX/feIrLrDHGkQFJr/bB4/JYpsvOENmef/qNn7muSWjokRopLGRlMLy5DEgu9DsvABCCFA8Wo3p6uKtb73N5eyjBtX5WpFTzhFNwzFqFvdn0DbtpP2eWNFaiJHwmwWmKJzQO2WfgbpPPANodesmNDQ1bCUoO8OLM9iIllD5B3AUPTYerXrL9WBNL4u37vyvFzlsTiijNSquGM7DB+WFNQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5167.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(23010399003)(1800799024)(376014)(10067099003)(56012099006)(261026121527099003)(261026140227099003)(261028144727099003)(261022105027099003)(261021123027099003)(261021121427099003)(261102123227099003)(261009223027099003)(22082099003)(18002099003)(11063799006)(6133799003)(13003099007)(8096899003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M0xwanFaVXJWUndBditGRVZ1aUt4b2FiRmNlMmxlQjdLcm1PamhUQXpNbkl6?= =?utf-8?B?T3JzYjdKbHhWMTdsVEhjQmNJcHE4eU81Z1o2WkxaS2QzV2ZjaVZjampNMU0r?= =?utf-8?B?dkhROERmbXFMUDJ5ZkFDL21qOU5LM0VKRzVpSEJza05UU2dsRGQrRXBpMVRl?= =?utf-8?B?N3dZaUc4ZG4ydVVQcVVTdE0rSGF3S3BQU3ZkaDZQN2F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9IanlSd2NKbWxXcnFFT1JZTnNnbXdmUkttWFpRZXZOT3FGY1Jy?= =?utf-8?B?eHA3bENxSCtJb0V2MWtZUm43bkUvQWZ4RmRSMDlXU3l4QkEwUDk1aEE1K1A0?= =?utf-8?B?dnozTFAvVEk1SUkycEtyS1NOdlJHRnlqK3MrZW9oSUthai8zK3BGREp6VDB5?= =?utf-8?B?cjVVQ2s2OXpiNzY0a1A5bnZxdjkrdjlvck5MNmVxZ0c1SFRTNjFKM1lXT2dF?= =?utf-8?B?K2FHVmJGdTBsZUdJQUR2a1FhM0kveFdNWGUrWDdHeHBtT0NMNmdNaUxqNnVR?= =?utf-8?Q?HsiHLShWa6MqBSN029?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d62a420-9618-4db8-2209-08df4ef43339 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5167.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2026 15:11:25.3174 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UgYhtYT8ZrlstWtin2rqWEZmoao39NONQZqT04NlJZ9fmGl6qXnfN9b0I9W4S1/m X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8336 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "amd-gfx" X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 --------------67MLphrreCSwTYiX90DaR6Gd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026-11-30 09:50, Lin Huiyi wrote: > [Some people who received this message don't often get email fromxinghui79@qq.com. Learn why this is important athttps://aka.ms/LearnAboutSenderIdentification ] > > amdgpu_ualink_peer_remote_init() maps a set of GART ranges for every > remote peer. If one of the amdgpu_ualink_gart_map() calls fails, it > breaks out of the loop and returns an error, but the mappings created > for the peers processed so far are left behind. > > amdgpu_ualink_sw_init() then takes the out_sdma_entities_fini path, which > only tears down the SDMA entities and frees the remote structure without > calling amdgpu_ualink_peer_remote_fini(). The already-allocated > drm_mm_nodes stay registered in the shared GTT manager after the memory > that tracked them is gone, corrupting the drm_mm state and leaking GART > space on every failed activation. > > Fix this by calling amdgpu_ualink_peer_remote_fini() on the error path. > Move the peer mutex initialization ahead of the fallible mappings so that > fini can safely destroy the locks even when only some peers were mapped; > gart_unmap() already ignores unallocated nodes. > > Fixes: 6e3834ceaf2f ("drm/amdgpu: Add UALink cross-GPU TLB shootdown and remote interrupt") > Signed-off-by: Lin Huiyi > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c > index b4fac5ecab..74c9e72727 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c > @@ -6186,6 +6186,12 @@ static int amdgpu_ualink_peer_remote_init(struct amdgpu_device *adev) > dev_dbg(adev->dev, "src_accel_id %u gart mapping flags 0x%llx\n", > src_accel_id, flags); > > + /* Initialize all locks before any fallible mapping so fini can unwind. */ > + for_each_set_bit(dst_accel_id, remote->active_accel_bits, AMDGPU_UALINK_ACCEL_MAX) { > + if (dst_accel_id != src_accel_id) > + mutex_init(&remote->peer[dst_accel_id].lock); > + } > + Calling mutex_destroy() on an all-zero struct mutex is safe in every config, so this for loop isn't needed. Please remove it. > for_each_set_bit(dst_accel_id, remote->active_accel_bits, AMDGPU_UALINK_ACCEL_MAX) { > if (dst_accel_id == src_accel_id) > continue; > @@ -6193,7 +6199,6 @@ static int amdgpu_ualink_peer_remote_init(struct amdgpu_device *adev) > dev_dbg(adev->dev, "peer_remote to dst_accel_id %u\n", dst_accel_id); > > peer = &remote->peer[dst_accel_id]; > - mutex_init(&peer->lock); > > interrupt = &peer->interrupt; > shootdown = &peer->shootdown; > @@ -6353,11 +6358,13 @@ int amdgpu_ualink_sw_init(struct amdgpu_device *adev) > > r = amdgpu_ualink_peer_remote_init(adev); > if (r) > - goto out_sdma_entities_fini; > + goto out_peer_remote_fini; > > dev_dbg(adev->dev, "ualink sw init succeed\n"); > return 0; > > +out_peer_remote_fini: > + amdgpu_ualink_peer_remote_fini(adev); > out_sdma_entities_fini: The label out_sdma_entities_fini is no longer used, please remove itRegards, Philip > amdgpu_ualink_sdma_entities_fini(adev); > out_npa_unmap: > -- > 2.56.1 > --------------67MLphrreCSwTYiX90DaR6Gd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

On 2026-11-30 09:50, Lin Huiyi wrote:
[Some people who received this message don't often get email from xinghui79@qq.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

amdgpu_ualink_peer_remote_init() maps a set of GART ranges for every
remote peer. If one of the amdgpu_ualink_gart_map() calls fails, it
breaks out of the loop and returns an error, but the mappings created
for the peers processed so far are left behind.

amdgpu_ualink_sw_init() then takes the out_sdma_entities_fini path, which
only tears down the SDMA entities and frees the remote structure without
calling amdgpu_ualink_peer_remote_fini(). The already-allocated
drm_mm_nodes stay registered in the shared GTT manager after the memory
that tracked them is gone, corrupting the drm_mm state and leaking GART
space on every failed activation.

Fix this by calling amdgpu_ualink_peer_remote_fini() on the error path.
Move the peer mutex initialization ahead of the fallible mappings so that
fini can safely destroy the locks even when only some peers were mapped;
gart_unmap() already ignores unallocated nodes.

Fixes: 6e3834ceaf2f ("drm/amdgpu: Add UALink cross-GPU TLB shootdown and remote interrupt")
Signed-off-by: Lin Huiyi <xinghui79@qq.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
index b4fac5ecab..74c9e72727 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
@@ -6186,6 +6186,12 @@ static int amdgpu_ualink_peer_remote_init(struct amdgpu_device *adev)
        dev_dbg(adev->dev, "src_accel_id %u gart mapping flags 0x%llx\n",
                src_accel_id, flags);

+       /* Initialize all locks before any fallible mapping so fini can unwind. */
+       for_each_set_bit(dst_accel_id, remote->active_accel_bits, AMDGPU_UALINK_ACCEL_MAX) {
+               if (dst_accel_id != src_accel_id)
+                       mutex_init(&remote->peer[dst_accel_id].lock);
+       }
+
Calling mutex_destroy() on an all-zero struct mutex is safe in every config, so this for loop isn't needed. Please remove it.
        for_each_set_bit(dst_accel_id, remote->active_accel_bits, AMDGPU_UALINK_ACCEL_MAX) {
                if (dst_accel_id == src_accel_id)
                        continue;
@@ -6193,7 +6199,6 @@ static int amdgpu_ualink_peer_remote_init(struct amdgpu_device *adev)
                dev_dbg(adev->dev, "peer_remote to dst_accel_id %u\n", dst_accel_id);

                peer = &remote->peer[dst_accel_id];
-               mutex_init(&peer->lock);

                interrupt = &peer->interrupt;
                shootdown = &peer->shootdown;
@@ -6353,11 +6358,13 @@ int amdgpu_ualink_sw_init(struct amdgpu_device *adev)

        r = amdgpu_ualink_peer_remote_init(adev);
        if (r)
-               goto out_sdma_entities_fini;
+               goto out_peer_remote_fini;

        dev_dbg(adev->dev, "ualink sw init succeed\n");
        return 0;

+out_peer_remote_fini:
+       amdgpu_ualink_peer_remote_fini(adev);
 out_sdma_entities_fini:
The label out_sdma_entities_fini is no longer used, please remove it Regards, Philip
        amdgpu_ualink_sdma_entities_fini(adev);
 out_npa_unmap:
--
2.56.1


--------------67MLphrreCSwTYiX90DaR6Gd--