Commit 9eb00b5f authored by Robert McClinton's avatar Robert McClinton Committed by Alex Deucher
Browse files

drm/radeon: delete radeon_fence_process in is_signaled, no deadlock

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.

Link: https://github.com/brave/brave-browser/issues/49182
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4641


Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRobert McClinton <rbmccav@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 527ba26e)
Cc: stable@vger.kernel.org
parent 1788ef30
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -360,13 +360,6 @@ static bool radeon_fence_is_signaled(struct dma_fence *f)
	if (atomic64_read(&rdev->fence_drv[ring].last_seq) >= seq)
		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;
}