Commit f5d896bb authored by Jay Cornwall's avatar Jay Cornwall Committed by Oded Gabbay

amdkfd: Fix memory leak on process deregistration

struct device_process_node was allocated during process registration but
not released at process deregistration.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarJay Cornwall <jay.cornwall@amd.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@amd.com>
parent 5cd78de5
...@@ -409,6 +409,7 @@ static int unregister_process_nocpsch(struct device_queue_manager *dqm, ...@@ -409,6 +409,7 @@ static int unregister_process_nocpsch(struct device_queue_manager *dqm,
list_for_each_entry_safe(cur, next, &dqm->queues, list) { list_for_each_entry_safe(cur, next, &dqm->queues, list) {
if (qpd == cur->qpd) { if (qpd == cur->qpd) {
list_del(&cur->list); list_del(&cur->list);
kfree(cur);
dqm->processes_count--; dqm->processes_count--;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment