drm/amd/powerplay: fix memory leak in rv_hwmgr backend
Subsystems (2)
PATCH 1/2 drm/amd/powerplay: fix memory leak in rv_hwmgr backend
vddc_dep_on_dal_pwrl and vq_budgeting_table are allocated and initialized in rv_hwmgr_backend_init. Thus free the memory in rv_hwmgr_backend_fini
--- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c +10 -0
@@ -670,6 +670,16 @@ static int rv_hwmgr_backend_fini(struct pp_hwmgr *hwmgr) pinfo->vdd_dep_on_phyclk =NULL ; } +if (NULL != hwmgr->dyn_state.vddc_dep_on_dal_pwrl) { +kfree (hwmgr->dyn_state.vddc_dep_on_dal_pwrl); + hwmgr->dyn_state.vddc_dep_on_dal_pwrl =NULL ; + } + +if (NULL != hwmgr->dyn_state.vq_budgeting_table) { +kfree (hwmgr->dyn_state.vq_budgeting_table); + hwmgr->dyn_state.vq_budgeting_table =NULL ; + } +kfree (hwmgr->backend); hwmgr->backend =NULL ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1496738170-2743-1-git-send-email-Hawking.Zhang-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amd/powerplay: fix memory leak in cz_hwmgr backend
vddc_dep_on_dal_pwrl is allocated and initialized in cz_hwmgr_backend_init Thus free the memory in cz_hwmgr_backend_fini
--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +6 -0
@@ -1224,6 +1224,12 @@ static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)phm_destroy_table (hwmgr, &(hwmgr->disable_dynamic_state_management));phm_destroy_table (hwmgr, &(hwmgr->power_down_asic));phm_destroy_table (hwmgr, &(hwmgr->setup_asic)); + +if (NULL != hwmgr->dyn_state.vddc_dep_on_dal_pwrl) { +kfree (hwmgr->dyn_state.vddc_dep_on_dal_pwrl); + hwmgr->dyn_state.vddc_dep_on_dal_pwrl =NULL ; + } +kfree (hwmgr->backend); hwmgr->backend =NULL ; }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1496738170-2743-2-git-send-email-Hawking.Zhang-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 2/2] drm/amd/powerplay: fix memory leak in cz_hwmgr backend
Quoted 9 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Hawking Zhang
Sent: Tuesday, June 06, 2017 4:36 AM
To: [email protected]
Cc: Zhang, Hawking
Subject: [PATCH 2/2] drm/amd/powerplay: fix memory leak incz_hwmgrbackend
Quoted 5 lines
vddc_dep_on_dal_pwrlis allocated and initialized incz_hwmgr_backend_initThus free the memory incz_hwmgr_backend_finiChange-Id Idd6dd4b76894579674bf334339b71df8559637fdSigned-off-by Hawking Zhang <[email protected]>
Series is:
Quoted 28 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +6
-0@@ -1224,6 +1224,12 @@ static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr) phm_destroy_table(hwmgr, &(hwmgr- >disable_dynamic_state_management));phm_destroy_table (hwmgr, &(hwmgr- >power_down_asic));phm_destroy_table (hwmgr, &(hwmgr->setup_asic)); + +if (NULL != hwmgr->dyn_state.vddc_dep_on_dal_pwrl) { +kfree (hwmgr->dyn_state.vddc_dep_on_dal_pwrl); + hwmgr->dyn_state.vddc_dep_on_dal_pwrl =NULL ; + } +drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +0
-1kfree (hwmgr->backend); hwmgr->backend =NULL ; } --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx