Skip to contentSkip to conversation

drm/radeon: delete radeon_fence_process in is_signaled, no deadlock

PATCH Applied Li hongliang 2 participants 2 messages Feb 2 – Feb 3

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: delete radeon_fence_process in is_signaled, no deadlock

From: Robert McClinton <[email protected]>

[ Upstream commit 9eb00b5f5697bd56baa3222c7a1426fa15bacfb5 ]

Delete the attempt to progress the queue when checking if fence is signaled. This avoids deadlock.

dma-fence_ops::signaled can be called with the fence lock in unknown state. For radeon, the fence lock is also the wait queue lock. This can cause a self deadlock when signaled() tries to make forward progress on the wait queue. But advancing the queue is unneeded because incorrectly returning false from signaled() is perfectly acceptable.

Cc Alex Deucher <[email protected]>
(cherry picked from commit 527ba26e50ec2ca2be9c7c82f3ad42998a75d0db)
[ Minor conflict resolved. ]
---
 drivers/gpu/drm/radeon/radeon_fence.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/gpu/drm/radeon/radeon_fence.c +0 -8
index 6d5e828fa39e..1462837fda5a 100644
@@ -362,14 +362,6 @@ static bool radeon_fence_is_signaled(struct dma_fence *f)
 		return true;
 	}
 
-	if (down_read_trylock(&rdev->exclusive_lock)) {
-		radeon_fence_process(rdev, ring);
-		up_read(&rdev->exclusive_lock);
-
-		if (atomic64_read(&rdev->fence_drv[ring].last_seq) >= seq) {
-			return true;
-		}
-	}
 	return false;
 }
 
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw

Patch "drm/radeon: delete radeon_fence_process in is_signaled, no deadlock" has been added to the 6.6-stable tree

This is a note to let you know that I've just added the patch titled

drm/radeon: delete radeon_fence_process in is_signaled, no deadlock

to the 6.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-radeon-delete-radeon_fence_process-in-is_signaled-no-deadlock.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From [email protected] Mon Feb 2 08:58:36 2026
From: Li hongliang <[email protected]>
Date: Mon, 2 Feb 2026 15:58:31 +0800
Subject: drm/radeon: delete radeon_fence_process in is_signaled, no deadlock
To: [email protected], [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Message-ID: <[email protected]>

From: Robert McClinton <[email protected]>

[ Upstream commit 9eb00b5f5697bd56baa3222c7a1426fa15bacfb5 ]

Delete the attempt to progress the queue when checking if fence is signaled. This avoids deadlock.

dma-fence_ops::signaled can be called with the fence lock in unknown state. For radeon, the fence lock is also the wait queue lock. This can cause a self deadlock when signaled() tries to make forward progress on the wait queue. But advancing the queue is unneeded because incorrectly returning false from signaled() is perfectly acceptable.

---
 drivers/gpu/drm/radeon/radeon_fence.c |    8 --------
 1 file changed, 8 deletions(-)
drivers/gpu/drm/radeon/radeon_fence.c +0 -8
@@ -362,14 +362,6 @@ static bool radeon_fence_is_signaled(str
 		return true;
 	}
 
-	if (down_read_trylock(&rdev->exclusive_lock)) {
-		radeon_fence_process(rdev, ring);
-		up_read(&rdev->exclusive_lock);
-
-		if (atomic64_read(&rdev->fence_drv[ring].last_seq) >= seq) {
-			return true;
-		}
-	}
 	return false;
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-6.6/drm-radeon-delete-radeon_fence_process-in-is_signaled-no-deadlock.patch queue-6.6/ksmbd-fix-race-condition-in-rpc-handle-list-access.patch queue-6.6/wifi-ath11k-add-srng-lock-for-ath11k_hal_srng_-in-monitor-mode.patch queue-6.6/drm-amdgpu-replace-mutex-with-spinlock-for-rlcg-register-access-to-avoid-priority-inversion-in-sriov.patch