All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak
@ 2022-05-17  9:57 Yuanjun Gong
  2022-05-17 10:06   ` Greg KH
  2022-05-17 20:59   ` Alex Deucher
  0 siblings, 2 replies; 5+ messages in thread
From: Yuanjun Gong @ 2022-05-17  9:57 UTC (permalink / raw)
  To: Yuanjun Gong, Evan Quan, amd-gfx, linux-kernel; +Cc: stable

From: Gong Yuanjun <ruc_gongyuanjun@163.com>

gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
not freed in yellow_carp_fini_smc_tables().

Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
index e2d099409123..c66c39ccf19c 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
@@ -190,6 +190,9 @@ static int yellow_carp_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.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak
  2022-05-17  9:57 [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak Yuanjun Gong
@ 2022-05-17 10:06   ` Greg KH
  2022-05-17 20:59   ` Alex Deucher
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2022-05-17 10:06 UTC (permalink / raw)
  To: Yuanjun Gong; +Cc: Evan Quan, amd-gfx, linux-kernel, stable

On Tue, May 17, 2022 at 05:57:46PM +0800, Yuanjun Gong wrote:
> From: Gong Yuanjun <ruc_gongyuanjun@163.com>
> 
> gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
> not freed in yellow_carp_fini_smc_tables().
> 
> Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> index e2d099409123..c66c39ccf19c 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> @@ -190,6 +190,9 @@ static int yellow_carp_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.17.1
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak
@ 2022-05-17 10:06   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2022-05-17 10:06 UTC (permalink / raw)
  To: Yuanjun Gong; +Cc: stable, Evan Quan, linux-kernel, amd-gfx

On Tue, May 17, 2022 at 05:57:46PM +0800, Yuanjun Gong wrote:
> From: Gong Yuanjun <ruc_gongyuanjun@163.com>
> 
> gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
> not freed in yellow_carp_fini_smc_tables().
> 
> Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> index e2d099409123..c66c39ccf19c 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> @@ -190,6 +190,9 @@ static int yellow_carp_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.17.1
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak
  2022-05-17  9:57 [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak Yuanjun Gong
@ 2022-05-17 20:59   ` Alex Deucher
  2022-05-17 20:59   ` Alex Deucher
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2022-05-17 20:59 UTC (permalink / raw)
  To: Yuanjun Gong; +Cc: Evan Quan, amd-gfx list, LKML

Applied.  Thanks!

On Tue, May 17, 2022 at 9:13 AM Yuanjun Gong <ruc_gongyuanjun@163.com> wrote:
>
> From: Gong Yuanjun <ruc_gongyuanjun@163.com>
>
> gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
> not freed in yellow_carp_fini_smc_tables().
>
> Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> index e2d099409123..c66c39ccf19c 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> @@ -190,6 +190,9 @@ static int yellow_carp_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.17.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak
@ 2022-05-17 20:59   ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2022-05-17 20:59 UTC (permalink / raw)
  To: Yuanjun Gong; +Cc: Evan Quan, LKML, amd-gfx list

Applied.  Thanks!

On Tue, May 17, 2022 at 9:13 AM Yuanjun Gong <ruc_gongyuanjun@163.com> wrote:
>
> From: Gong Yuanjun <ruc_gongyuanjun@163.com>
>
> gpu_metrics_table is allocated in yellow_carp_init_smc_tables() but
> not freed in yellow_carp_fini_smc_tables().
>
> Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@163.com>
> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> index e2d099409123..c66c39ccf19c 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
> @@ -190,6 +190,9 @@ static int yellow_carp_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.17.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-17 20:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17  9:57 [PATCH 1/1] drm/amd/pm: fix a potential gpu_metrics_table memory leak Yuanjun Gong
2022-05-17 10:06 ` Greg KH
2022-05-17 10:06   ` Greg KH
2022-05-17 20:59 ` Alex Deucher
2022-05-17 20:59   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.