aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1459-drm-amdkfd-Fix-a-memory-leak-in-memory-unmapping.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1459-drm-amdkfd-Fix-a-memory-leak-in-memory-unmapping.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1459-drm-amdkfd-Fix-a-memory-leak-in-memory-unmapping.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1459-drm-amdkfd-Fix-a-memory-leak-in-memory-unmapping.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1459-drm-amdkfd-Fix-a-memory-leak-in-memory-unmapping.patch
new file mode 100644
index 00000000..e011ff2f
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1459-drm-amdkfd-Fix-a-memory-leak-in-memory-unmapping.patch
@@ -0,0 +1,28 @@
+From ad4d5e648cc68a0c7d6cccd7bf4a13cf2db10cdb Mon Sep 17 00:00:00 2001
+From: Yong Zhao <yong.zhao@amd.com>
+Date: Thu, 16 Jun 2016 14:30:31 -0400
+Subject: [PATCH 1459/4131] drm/amdkfd: Fix a memory leak in memory unmapping
+
+The kmalloc memory should be freed before exiting the function.
+
+Change-Id: If10cd8e7e09afe4b15ceb79514dea23c049b3367
+Signed-off-by: Yong Zhao <yong.zhao@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+index d72371d..43d3954 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+@@ -1555,6 +1555,7 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep,
+ mem, peer_pdd->vm);
+ radeon_flush_tlb(peer, p->pasid);
+ }
++ kfree(devices_arr);
+ } else {
+ dev->kfd2kgd->unmap_memory_to_gpu(dev->kgd, mem, pdd->vm);
+ radeon_flush_tlb(dev, p->pasid);
+--
+2.7.4
+