drm/amdkfd: fix circular locking on get_wave_state
authorJonathan Kim <jonathan.kim@amd.com>
Fri, 11 Jun 2021 17:36:34 +0000 (13:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Jun 2021 21:25:40 +0000 (17:25 -0400)
commit63f6e01237257e7226efc5087f3f0b525d320f54
treeeaa4d754b46c64074c8fa277aa2733992e28ba9e
parent03fc4cf45d30533d54f0f4ebc02aacfa12f52ce2
drm/amdkfd: fix circular locking on get_wave_state

get_wave_state acquires the mmap_lock on copy_to_user but so do
mmu_notifiers.  mmu_notifiers allows dqm locking so do get_wave_state
outside the dqm_lock to prevent circular locking.

v2: squash in unused variable removal.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c