Skip to content

Commit 0d07f6d

Browse files
fxkamdamd-aakash
authored andcommitted
drm/amdkfd: Work around mmu_notifier_put issue on RHEL 8.3
The DRM backport from kernel 5.6 includes some MMU notifier changes that cause problems with the mmu_notifier_put function. The free_notifier never gets called. This leads to a leak of kfd_process structures and their doorbells. Work around this by falling back to the old method of releasing the MMU notifier and destryoing the process structure. Change-Id: I711a61efee2b284e385251b7f826e228e64c04f2 Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Oak Zeng <Oak.Zeng@amd.com> Reviewed-by: Flora Cui<flora.cui@amd.com>
1 parent 9b141c0 commit 0d07f6d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_priv.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,11 @@ struct kfd_process {
864864
/* We want to receive a notification when the mm_struct is destroyed */
865865
struct mmu_notifier mmu_notifier;
866866

867+
#if defined(DRM_VER) && defined(DRM_PATCH) && DRM_VER == 5 && DRM_PATCH == 6 \
868+
&& LINUX_VERSION_CODE == KERNEL_VERSION(4, 18, 0)
869+
/* mmu_notifier_put in the RH DRM backport from 5.6 is broken */
870+
# undef HAVE_MMU_NOTIFIER_PUT
871+
#endif
867872
#ifndef HAVE_MMU_NOTIFIER_PUT
868873
/* Use for delayed freeing of kfd_process structure */
869874
struct rcu_head rcu;

0 commit comments

Comments
 (0)