diff mbox

amdgpu: fix missing deinit on vamgr_32

Message ID 1441031794-28463-1-git-send-email-alexander.deucher@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Deucher Aug. 31, 2015, 2:36 p.m. UTC
From: "monk.liu" <monk.liu@amd.com>

Signed-off-by: monk.liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 amdgpu/amdgpu_device.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Emil Velikov Sept. 1, 2015, 7:15 a.m. UTC | #1
Hi Alex,

Still reading through/learning about amdgpu, so a couple of (not too
silly) questions :-)

On 31 August 2015 at 15:36, Alex Deucher <alexdeucher@gmail.com> wrote:
> From: "monk.liu" <monk.liu@amd.com>
>
> Signed-off-by: monk.liu <monk.liu@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  amdgpu/amdgpu_device.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
> index 75b12e2..e5a923e 100644
> --- a/amdgpu/amdgpu_device.c
> +++ b/amdgpu/amdgpu_device.c
> @@ -132,6 +132,8 @@ static void amdgpu_device_free_internal(amdgpu_device_handle dev)
>  {
Do we want to keep fd_mutex held as/just before we get here ?

>         amdgpu_vamgr_deinit(dev->vamgr);
>         free(dev->vamgr);
> +       amdgpu_vamgr_deinit(dev->vamgr_32);
> +       free(dev->vamgr_32);
Based off amdgpu_device_initialize(), shouldn't one also keep track of
the 'start' va and and "free" it ?

>         util_hash_table_destroy(dev->bo_flink_names);
>         util_hash_table_destroy(dev->bo_handles);
Mildly related suggestion for a follow up patch -
amdgpu_device_initialize() seems to be missing the these two.

Thanks
Emil
diff mbox

Patch

diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index 75b12e2..e5a923e 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -132,6 +132,8 @@  static void amdgpu_device_free_internal(amdgpu_device_handle dev)
 {
 	amdgpu_vamgr_deinit(dev->vamgr);
 	free(dev->vamgr);
+	amdgpu_vamgr_deinit(dev->vamgr_32);
+	free(dev->vamgr_32);
 	util_hash_table_destroy(dev->bo_flink_names);
 	util_hash_table_destroy(dev->bo_handles);
 	pthread_mutex_destroy(&dev->bo_table_mutex);