[PATCH] drm/amdgpu: release parent fence reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's done in amd_sched_hw_job_reset(), but not in normal job processing.
Leak reported by CONFIG_SLUB_DEBUG.

Signed-off-by: Grazvydas Ignotas <notasas@xxxxxxxxx>
---
 CONFIG_SLUB_DEBUG reports more leaks related to ioctls,
 but I was unable to track them down...

 drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 910b8d5..cfb686e 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -522,6 +522,8 @@ static void amd_sched_process_job(struct fence *f, struct fence_cb *cb)
 
 	trace_amd_sched_process_job(s_fence);
 	fence_put(&s_fence->finished);
+	fence_put(s_fence->parent);
+	s_fence->parent = NULL;
 	wake_up_interruptible(&sched->wake_up_worker);
 }
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux