]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm: Fix a potential gpu_metrics_table memory leak
authorZhen Ni <nizhen@uniontech.com>
Wed, 3 Aug 2022 09:19:58 +0000 (17:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:31:32 +0000 (10:31 +0200)
commit4b25bdb54578f3b96ff055e5d27bc1cb82950e51
tree1164cdffa9472f25e04b8b36a1b552692c447517
parent21e3891abc83f2d5482c67cca2fb7f228635daaf
drm/amd/pm: Fix a potential gpu_metrics_table memory leak

[ Upstream commit 5afb76522a0af0513b6dc01f84128a73206b051b ]

Memory is allocated for gpu_metrics_table in
smu_v13_0_4_init_smc_tables(), but not freed in
smu_v13_0_4_fini_smc_tables(). This may cause memory leaks, fix it.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Zhen Ni <nizhen@uniontech.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c