Commit 98dc529a authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: fix amdgpu_userq_evict



Canceling the resume worker synchonized can deadlock because it can in
turn wait for the eviction worker through the userq_mutex.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarSunil Khatri <sunil.khatri@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 688b87d3
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1331,12 +1331,7 @@ amdgpu_userq_evict(struct amdgpu_userq_mgr *uq_mgr,
	/* Signal current eviction fence */
	amdgpu_eviction_fence_signal(evf_mgr, ev_fence);

	if (evf_mgr->fd_closing) {
		cancel_delayed_work_sync(&uq_mgr->resume_work);
		return;
	}

	/* Schedule a resume work */
	if (!evf_mgr->fd_closing)
		schedule_delayed_work(&uq_mgr->resume_work, 0);
}