aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1496-drm-amdkfd-Fix-kernel-panic-in-PPR-handler.patch
blob: 5c4e6e16b3c552d3ce0683dc789aedaa9e2ed083 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From dc3584a5b81f68c8018a43fd4034dd8b67bcf618 Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling@amd.com>
Date: Mon, 29 Aug 2016 19:38:54 -0400
Subject: [PATCH 1496/4131] drm/amdkfd: Fix kernel panic in PPR handler

Use the correct function to release the reference to mm_struct in
kfd_signal_iommu_event. The counterpart to get_task_mm is mmput,
not mmdrop. This fixes a kernel panic after getting PPR events
from the IOMMUv2.

Bug: SWDEV-101197

Change-Id: Iba45bf4ce98e5c02ee11cb86d199d0c9f69c2c42
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
index f110eba..939b7e7 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
@@ -1070,7 +1070,7 @@ void kfd_signal_iommu_event(struct kfd_dev *dev, unsigned int pasid,
 	}
 
 	up_read(&mm->mmap_sem);
-	mmdrop(mm);
+	mmput(mm);
 
 	mutex_lock(&p->event_mutex);
 
-- 
2.7.4