From 71e308252aad8d92d6653da58bf2a8ffaa640832 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 22 Dec 2021 12:30:38 +0000 Subject: [PATCH] drm/amd/pm: fix a potential gpu_metrics_table memory leak From Lang Yu 222cebd995cdf11fe0d502749560f65e64990e55 in linux 5.10.y/5.10.88 aa464957f7e660abd554f2546a588f6533720e21 in mainline linux --- sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c b/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c index 9517f15f0f7..b9e5443f348 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c +++ b/sys/dev/pci/drm/amd/pm/swsmu/smu12/smu_v12_0.c @@ -187,6 +187,9 @@ int smu_v12_0_fini_smc_tables(struct smu_context *smu) kfree(smu_table->watermarks_table); smu_table->watermarks_table = NULL; + kfree(smu_table->gpu_metrics_table); + smu_table->gpu_metrics_table = NULL; + return 0; } -- 2.20.1