aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1636-drm-amdgpu-Use-GFP_NOIO-with-reclaim-safe-locks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1636-drm-amdgpu-Use-GFP_NOIO-with-reclaim-safe-locks.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1636-drm-amdgpu-Use-GFP_NOIO-with-reclaim-safe-locks.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1636-drm-amdgpu-Use-GFP_NOIO-with-reclaim-safe-locks.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1636-drm-amdgpu-Use-GFP_NOIO-with-reclaim-safe-locks.patch
new file mode 100644
index 00000000..755935cf
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1636-drm-amdgpu-Use-GFP_NOIO-with-reclaim-safe-locks.patch
@@ -0,0 +1,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
+