Patch "ARM: cns3xxx: Fix refcount leak in cns3xxx_init" has been added to the 5.18-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: cns3xxx: Fix refcount leak in cns3xxx_init

to the 5.18-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-cns3xxx-fix-refcount-leak-in-cns3xxx_init.patch
and it can be found in the queue-5.18 subdirectory.

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


>From 1ba904b6b16e08de5aed7c1349838d9cd0d178c5 Mon Sep 17 00:00:00 2001
From: Miaoqian Lin <linmq006@xxxxxxxxx>
Date: Sun, 5 Jun 2022 11:58:41 +0400
Subject: ARM: cns3xxx: Fix refcount leak in cns3xxx_init

From: Miaoqian Lin <linmq006@xxxxxxxxx>

commit 1ba904b6b16e08de5aed7c1349838d9cd0d178c5 upstream.

of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 415f59142d9d ("ARM: cns3xxx: initial DT support")
Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
Acked-by: Krzysztof Halasa <khalasa@xxxxxxx>
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/arm/mach-cns3xxx/core.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -372,6 +372,7 @@ static void __init cns3xxx_init(void)
 		/* De-Asscer SATA Reset */
 		cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SATA));
 	}
+	of_node_put(dn);
 
 	dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-sdhci");
 	if (of_device_is_available(dn)) {
@@ -385,6 +386,7 @@ static void __init cns3xxx_init(void)
 		cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));
 		cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO));
 	}
+	of_node_put(dn);
 
 	pm_power_off = cns3xxx_power_off;
 


Patches currently in stable-queue which might be from linmq006@xxxxxxxxx are

queue-5.18/memory-mtk-smi-add-missing-put_device-call-in-mtk_smi_device_link_common.patch
queue-5.18/iio-adc-adi-axi-adc-fix-refcount-leak-in-adi_axi_adc_attach_client.patch
queue-5.18/memory-samsung-exynos5422-dmc-fix-refcount-leak-in-of_get_dram_timings.patch
queue-5.18/arm-fix-refcount-leak-in-axxia_boot_secondary.patch
queue-5.18/drm-msm-mdp4-fix-refcount-leak-in-mdp4_modeset_init_.patch
queue-5.18/arm-cns3xxx-fix-refcount-leak-in-cns3xxx_init.patch
queue-5.18/iio-adc-aspeed-fix-refcount-leak-in-aspeed_adc_set_trim_data.patch
queue-5.18/soc-bcm-brcmstb-pm-pm-arm-fix-refcount-leak-in-brcmstb_pm_probe.patch
queue-5.18/arm-exynos-fix-refcount-leak-in-exynos_map_pmu.patch



[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