]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amd/pm: fix a potential gpu_metrics_table memory leak
authorLang Yu <lang.yu@amd.com>
Tue, 14 Dec 2021 07:25:54 +0000 (15:25 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:26 +0000 (09:49 +0100)
commitf9d6b33616007202ea90ea97bde0bc8318bb888a
treea9f78feeb4d5f09721cd2f29cece77730d5425ae
parentf094cb5223048724380d4469f724f359b7d61a6a
drm/amd/pm: fix a potential gpu_metrics_table memory leak

BugLink: https://bugs.launchpad.net/bugs/1956302
[ Upstream commit aa464957f7e660abd554f2546a588f6533720e21 ]

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: 95868b85764a ("drm/amd/powerplay: add Renoir support for gpu metrics export")
Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c