amdgpu_job_free_resources is already called by submit_job.
If it is called in run_job, the sched fence could be got twice in sa bo free,
then memory leak happens.

Change-Id: I833612e31cf22b62174f3f76546fd11c9ea38780
Signed-off-by: Chunming Zhou <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 8d87a9a..d56247d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -183,7 +183,7 @@ static struct fence *amdgpu_job_run(struct amd_sched_job 
*sched_job)
        /* if gpu reset, hw fence will be replaced here */
        fence_put(job->fence);
        job->fence = fence_get(fence);
-       amdgpu_job_free_resources(job);
+
        return fence;
 }
 
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to