amdkfd: Fix memory leak on process deregistration
authorJay Cornwall <jay.cornwall@amd.com>
Thu, 20 Nov 2014 17:52:16 +0000 (11:52 -0600)
committerOded Gabbay <oded.gabbay@amd.com>
Thu, 20 Nov 2014 17:52:16 +0000 (11:52 -0600)
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>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

index 718f50e81e28a86a8ce6aeb76f276291cae55483..bc8961c3e0734385561c44d5dee024e89ff1224f 100644 (file)
@@ -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;
                }