Patch "drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amd-pm-fix-a-memory-leak-in-an-error-handling-pa.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7ef268b071cbbeb19522166565a9bd1adedd8805
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Thu Aug 5 20:37:14 2021 +0200

    drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'
    
    [ Upstream commit 5126da7d99cf6396c929f3b577ba3aed1e74acd7 ]
    
    'watermarks_table' must be freed instead 'clocks_table', because
    'clocks_table' is known to be NULL at this point and 'watermarks_table' is
    never freed if the last kzalloc fails.
    
    Fixes: c98ee89736b8 ("drm/amd/pm: add the fine grain tuning function for vangogh")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
index 77f532a49e37..bacef9120b8d 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -242,7 +242,7 @@ static int vangogh_tables_init(struct smu_context *smu)
 	return 0;
 
 err3_out:
-	kfree(smu_table->clocks_table);
+	kfree(smu_table->watermarks_table);
 err2_out:
 	kfree(smu_table->gpu_metrics_table);
 err1_out:



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux