diff options
author | Oded Gabbay <oded.gabbay@amd.com> | 2014-11-25 15:16:38 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2014-11-25 15:16:38 +0200 |
commit | 6f9d54fd6e0125b17fb286e1e54e934dd11f60d3 (patch) | |
tree | 5c80a19ff8c19633877fc0db2c11de83f7f15702 /drivers/gpu/drm/amd | |
parent | e048a0b26033b35eb36c20e4d36fb466a2570c27 (diff) | |
download | op-kernel-dev-6f9d54fd6e0125b17fb286e1e54e934dd11f60d3.zip op-kernel-dev-6f9d54fd6e0125b17fb286e1e54e934dd11f60d3.tar.gz |
amdkfd: Fix memory leak of mqds on dqm fini
The mqds array members are not freed when dqm is uninitialized.
Reviewed-by: Ben Goz <Ben.Goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 904eb38..924e90c 100644 --- 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); |