[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR12MB2619E2FF16B6C68483876874E49C9@DM6PR12MB2619.namprd12.prod.outlook.com>
Date: Wed, 3 Aug 2022 09:44:44 +0000
From: "Quan, Evan" <Evan.Quan@....com>
To: Zhen Ni <nizhen@...ontech.com>,
"airlied@...ux.ie" <airlied@...ux.ie>,
"daniel@...ll.ch" <daniel@...ll.ch>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Koenig, Christian" <Christian.Koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>
CC: "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2] drm/amd/pm: Fix a potential gpu_metrics_table memory
leak
[AMD Official Use Only - General]
Thanks for the fixes! The series is reviewed-by: Evan Quan <evan.quan@....com>
Evan
> -----Original Message-----
> From: Zhen Ni <nizhen@...ontech.com>
> Sent: Wednesday, August 3, 2022 5:20 PM
> To: airlied@...ux.ie; daniel@...ll.ch; Quan, Evan <Evan.Quan@....com>;
> Deucher, Alexander <Alexander.Deucher@....com>; Koenig, Christian
> <Christian.Koenig@....com>; Pan, Xinhui <Xinhui.Pan@....com>
> Cc: amd-gfx@...ts.freedesktop.org; dri-devel@...ts.freedesktop.org; linux-
> kernel@...r.kernel.org; Zhen Ni <nizhen@...ontech.com>
> Subject: [PATCH 2/2] drm/amd/pm: Fix a potential gpu_metrics_table
> memory leak
>
> Memory is allocated for gpu_metrics_table in
> smu_v13_0_5_init_smc_tables(), but not freed in
> smu_v13_0_5_fini_smc_tables(). This may cause memory leaks, fix it.
>
> Signed-off-by: Zhen Ni <nizhen@...ontech.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
> b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
> index b81711c4ff33..267c9c43a010 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
> @@ -167,6 +167,9 @@ static int smu_v13_0_5_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
>
>
Powered by blists - more mailing lists