projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e048a0b
)
amdkfd: Fix memory leak of mqds on dqm fini
author
Oded Gabbay
<
[email protected]
>
Tue, 25 Nov 2014 13:16:38 +0000
(15:16 +0200)
committer
Oded Gabbay
<
[email protected]
>
Tue, 25 Nov 2014 13:16:38 +0000
(15:16 +0200)
The mqds array members are not freed when dqm is uninitialized.
Reviewed-by: Ben Goz <
[email protected]
>
Signed-off-by: Oded Gabbay <
[email protected]
>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 904eb38e3b9f46c1cdffc8a23df77c9922ac2be0..924e90c072e513180ec8991b50333f2af663a3f5 100644
(file)
--- a/
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@
-575,11
+575,15
@@
static int initialize_nocpsch(struct device_queue_manager *dqm)
static void uninitialize_nocpsch(struct device_queue_manager *dqm)
{
+ int i;
+
BUG_ON(!dqm);
BUG_ON(dqm->queue_count > 0 || dqm->processes_count > 0);
kfree(dqm->allocated_queues);
+ for (i = 0 ; i < KFD_MQD_TYPE_MAX ; i++)
+ kfree(dqm->mqds[i]);
mutex_destroy(&dqm->lock);
kfd2kgd->free_mem(dqm->dev->kgd,
(struct kgd_mem *) dqm->pipeline_mem);