artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a5b39d
)
drm/amdkfd: Use mmget_not_zero in MMU notifier
author
jsg
<jsg@openbsd.org>
Wed, 22 Jun 2022 22:50:55 +0000
(22:50 +0000)
committer
jsg
<jsg@openbsd.org>
Wed, 22 Jun 2022 22:50:55 +0000
(22:50 +0000)
From Philip Yang
09c5cdbc62d99fc6306a21b24b60eb11a3bd0963
in linux 5.15.y/5.15.49
fa582c6f3684ac0098a9d02ddf0ed52a02b37127
in mainline linux
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
b/sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
index
830809b
..
74e6f61
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
+++ b/
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
@@
-2181,6
+2181,8
@@
svm_range_cpu_invalidate_pagetables(struct mmu_interval_notifier *mni,
if (range->event == MMU_NOTIFY_RELEASE)
return true;
+ if (!mmget_not_zero(mni->mm))
+ return true;
start = mni->interval_tree.start;
last = mni->interval_tree.last;
@@
-2207,6
+2209,7
@@
svm_range_cpu_invalidate_pagetables(struct mmu_interval_notifier *mni,
}
svm_range_unlock(prange);
+ mmput(mni->mm);
return true;
}