aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1391-Fix-a-memory-leak-in-error-handling.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1391-Fix-a-memory-leak-in-error-handling.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1391-Fix-a-memory-leak-in-error-handling.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1391-Fix-a-memory-leak-in-error-handling.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1391-Fix-a-memory-leak-in-error-handling.patch
new file mode 100644
index 00000000..73f69299
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1391-Fix-a-memory-leak-in-error-handling.patch
@@ -0,0 +1,28 @@
+From 5f6e5f638e1e420f73a173c6ad6b30eba1ab98fe Mon Sep 17 00:00:00 2001
+From: Yong Zhao <yong.zhao@amd.com>
+Date: Mon, 18 Apr 2016 16:58:55 -0400
+Subject: [PATCH 1391/4131] Fix a memory leak in error handling
+
+Change-Id: I55da0b1e4d9fbac69ec8f8cc25c0551b0764884a
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+index b0430c1..8d421f5 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+@@ -127,9 +127,9 @@ static int add_bo_to_vm(struct amdgpu_device *adev, uint64_t va,
+ * list. amdgpu_vm_clear_freed needs the PTs to be reserved so
+ * we don't call it here. That can wait until the next time
+ * the page tables are updated for a map or unmap. */
+- kfree(bo_va_entry);
+ err_vmadd:
+ amdgpu_bo_unreserve(bo);
++ kfree(bo_va_entry);
+ return ret;
+ }
+
+--
+2.7.4
+