mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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: f920e413ff
("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
This commit is contained in:
parent
41401ac677
commit
1fb8b1fc4d
1 changed files with 2 additions and 2 deletions
|
@ -243,11 +243,11 @@ get_sh_mem_bases_nybble_64(struct kfd_process_device *pdd)
|
||||||
static inline void dqm_lock(struct device_queue_manager *dqm)
|
static inline void dqm_lock(struct device_queue_manager *dqm)
|
||||||
{
|
{
|
||||||
mutex_lock(&dqm->lock_hidden);
|
mutex_lock(&dqm->lock_hidden);
|
||||||
dqm->saved_flags = memalloc_nofs_save();
|
dqm->saved_flags = memalloc_noreclaim_save();
|
||||||
}
|
}
|
||||||
static inline void dqm_unlock(struct device_queue_manager *dqm)
|
static inline void dqm_unlock(struct device_queue_manager *dqm)
|
||||||
{
|
{
|
||||||
memalloc_nofs_restore(dqm->saved_flags);
|
memalloc_noreclaim_restore(dqm->saved_flags);
|
||||||
mutex_unlock(&dqm->lock_hidden);
|
mutex_unlock(&dqm->lock_hidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue