Patch "ARM: OMAP2+: Fix memory leak in realtime_counter_init()" has been added to the 5.15-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

    ARM: OMAP2+: Fix memory leak in realtime_counter_init()

to the 5.15-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:
     arm-omap2-fix-memory-leak-in-realtime_counter_init.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 5084a827dbe8f6a4efe374faeec85f4fae74bcaa
Author: Chen Hui <judy.chenhui@xxxxxxxxxx>
Date:   Tue Nov 8 22:19:17 2022 +0800

    ARM: OMAP2+: Fix memory leak in realtime_counter_init()
    
    [ Upstream commit ed8167cbf65c2b6ff6faeb0f96ded4d6d581e1ac ]
    
    The "sys_clk" resource is malloced by clk_get(),
    it is not released when the function return.
    
    Fixes: fa6d79d27614 ("ARM: OMAP: Add initialisation for the real-time counter.")
    Signed-off-by: Chen Hui <judy.chenhui@xxxxxxxxxx>
    Message-Id: <20221108141917.46796-1-judy.chenhui@xxxxxxxxxx>
    Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 620ba69c8f114..5677c4a08f376 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -76,6 +76,7 @@ static void __init realtime_counter_init(void)
 	}
 
 	rate = clk_get_rate(sys_clk);
+	clk_put(sys_clk);
 
 	if (soc_is_dra7xx()) {
 		/*



[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