FAILED: patch "[PATCH] drm/amdgpu: fix memory leak in" failed to apply to 4.2-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.2-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
7a574557e62dc3d2d7ed55fa0b99e7d5bb403878Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <[email protected]>
Date: Thu, 8 Oct 2015 19:28:01 +0530
Subject: [PATCH] drm/amdgpu: fix memory leak in
amdgpu_vm_update_page_directory
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If amdgpu_ib_get() fails we returned the error code but we missed freeing ib.
Cc "Christian König" <[email protected]>
Cc Jammy Zhou <[email protected]>
Cc Chunming Zhou <[email protected]>
Cc Alex Deucher <[email protected]>
Cc "monk.liu" <[email protected]>
Signed-off-by Sudip Mukherjee <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +3 -1
@@ -455,8 +455,10 @@ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev,return -ENOMEM ; r =amdgpu_ib_get (ring,NULL , ndw *4 , ib); -if (r) +if (r) { +kfree (ib);return r; + } ib->length_dw =0 ;/* walk over the address space and update the page directory */