diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-02-06 03:53:16 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-02-06 03:53:16 +0000 |
commit | f70946736de18f01e98d6d39b25aef6caf19b41d (patch) | |
tree | d7fa94f274ab7ac1347080248edfc4f1b3ecbb1b /sys/dev/pci/drm/amd/amdkfd/kfd_svm.c | |
parent | 5b4fe0e732bd214bd170aefd21846e6014e4dcbb (diff) |
drm/amdkfd: Fix lock dependency warning with srcu
From Philip Yang
752312f6a79440086ac0f9b08d7776870037323c in linux-6.6.y/6.6.16
2a9de42e8d3c82c6990d226198602be44f43f340 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/amd/amdkfd/kfd_svm.c')
-rw-r--r-- | sys/dev/pci/drm/amd/amdkfd/kfd_svm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_svm.c b/sys/dev/pci/drm/amd/amdkfd/kfd_svm.c index a4c911fa167..b51224a85a3 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_svm.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_svm.c @@ -2343,8 +2343,10 @@ retry: mutex_unlock(&svms->lock); mmap_write_unlock(mm); - /* Pairs with mmget in svm_range_add_list_work */ - mmput(mm); + /* Pairs with mmget in svm_range_add_list_work. If dropping the + * last mm refcount, schedule release work to avoid circular locking + */ + mmput_async(mm); spin_lock(&svms->deferred_list_lock); } |