Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: Fix recursive lock warnings

memalloc_nofs_save/restore are no longer sufficient to prevent recursive
lock warnings when holding locks that can be taken in MMU notifiers. Use
memalloc_noreclaim_save/restore instead.

Fixes: f920e413ff9c ("mm: track mmu notifiers in fs_reclaim_acquire/release")
CC: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.10.x

authored by

Felix Kuehling and committed by
Alex Deucher
1fb8b1fc 41401ac6

+2 -2
+2 -2
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
··· 243 243 static inline void dqm_lock(struct device_queue_manager *dqm) 244 244 { 245 245 mutex_lock(&dqm->lock_hidden); 246 - dqm->saved_flags = memalloc_nofs_save(); 246 + dqm->saved_flags = memalloc_noreclaim_save(); 247 247 } 248 248 static inline void dqm_unlock(struct device_queue_manager *dqm) 249 249 { 250 - memalloc_nofs_restore(dqm->saved_flags); 250 + memalloc_noreclaim_restore(dqm->saved_flags); 251 251 mutex_unlock(&dqm->lock_hidden); 252 252 } 253 253