Browse Source

amdkfd: Fix memory leak on process deregistration

struct device_process_node was allocated during process registration but
not released at process deregistration.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Jay Cornwall 10 năm trước cách đây
mục cha
commit
f5d896bbd0
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

+ 1 - 0
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

@@ -409,6 +409,7 @@ static int unregister_process_nocpsch(struct device_queue_manager *dqm,
 	list_for_each_entry_safe(cur, next, &dqm->queues, list) {
 		if (qpd == cur->qpd) {
 			list_del(&cur->list);
+			kfree(cur);
 			dqm->processes_count--;
 			goto out;
 		}