提交 aa464957 编写于 作者: L Lang Yu 提交者: Alex Deucher

drm/amd/pm: fix a potential gpu_metrics_table memory leak

Memory is allocated for gpu_metrics_table in renoir_init_smc_tables(),
but not freed in int smu_v12_0_fini_smc_tables(). Free it!

Fixes: 95868b85 ("drm/amd/powerplay: add Renoir support for gpu metrics export")
Signed-off-by: NLang Yu <lang.yu@amd.com>
Reviewed-by: NLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 17c65d6f
...@@ -191,6 +191,9 @@ int smu_v12_0_fini_smc_tables(struct smu_context *smu) ...@@ -191,6 +191,9 @@ int smu_v12_0_fini_smc_tables(struct smu_context *smu)
kfree(smu_table->watermarks_table); kfree(smu_table->watermarks_table);
smu_table->watermarks_table = NULL; smu_table->watermarks_table = NULL;
kfree(smu_table->gpu_metrics_table);
smu_table->gpu_metrics_table = NULL;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册