aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1636-drm-amdgpu-Use-GFP_NOIO-with-reclaim-safe-locks.patch
blob: 755935cf763c40ad8371e92fe9cfd3cbb6f7b333 (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
From 02aaa54418071c4877ba0375f4102f97910a3d17 Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling@amd.com>
Date: Tue, 21 Mar 2017 11:25:30 -0400
Subject: [PATCH 1636/4131] drm/amdgpu: Use GFP_NOIO with reclaim-safe locks

Locks that are held in reclaim-fs context (in MMU notifiers invoked
under memory pressure) must not themselves cause memory reclaims
while held to prevent deadlocks. Use GFP_NOIO to ensure this.

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
index d961477..7076d08 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
@@ -410,7 +410,7 @@ int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
 	}
 
 	if (!node) {
-		node = kmalloc(sizeof(struct amdgpu_mn_node), GFP_KERNEL);
+		node = kmalloc(sizeof(struct amdgpu_mn_node), GFP_NOIO);
 		if (!node) {
 			mutex_unlock(&rmn->lock);
 			return -ENOMEM;
-- 
2.7.4