linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Liang He <windhl@126.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.9 09/30] mips: lantiq: xway: Fix refcount leak bug in sysctrl
Date: Mon, 26 Sep 2022 12:11:40 +0200	[thread overview]
Message-ID: <20220926100736.491653664@linuxfoundation.org> (raw)
In-Reply-To: <20220926100736.153157100@linuxfoundation.org>

From: Liang He <windhl@126.com>

[ Upstream commit 76695592711ef1e215cc24ed3e1cd857d7fc3098 ]

In ltq_soc_init(), of_find_compatible_node() will return a node
pointer with refcount incremented. We should use of_node_put() when
it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/mips/lantiq/xway/sysctrl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c
index dd7c36a193e3..6891456a7603 100644
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
@@ -457,6 +457,10 @@ void __init ltq_soc_init(void)
 			of_address_to_resource(np_ebu, 0, &res_ebu))
 		panic("Failed to get core resources");
 
+	of_node_put(np_pmu);
+	of_node_put(np_cgu);
+	of_node_put(np_ebu);
+
 	if (!request_mem_region(res_pmu.start, resource_size(&res_pmu),
 				res_pmu.name) ||
 		!request_mem_region(res_cgu.start, resource_size(&res_cgu),
-- 
2.35.1




  parent reply	other threads:[~2022-09-26 10:19 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 10:11 [PATCH 4.9 00/30] 4.9.330-rc1 review Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 01/30] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 02/30] cifs: dont send down the destination address to sendmsg for a SOCK_STREAM Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 03/30] drm/vc4: crtc: Use an union to store the page flip callback Greg Kroah-Hartman
2022-09-26 10:38   ` Pavel Machek
2022-09-26 16:11     ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 04/30] video: fbdev: skeletonfb: Fix syntax errors in comments Greg Kroah-Hartman
2022-09-26 10:28   ` Pavel Machek
2022-09-26 13:46     ` Bagas Sanjaya
2022-09-26 16:06     ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 05/30] video: fbdev: intelfb: Use aperture size from pci_resource_len Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 06/30] video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 07/30] video: fbdev: simplefb: Check before clk_put() not needed Greg Kroah-Hartman
2022-09-26 10:29   ` Pavel Machek
2022-09-26 16:09     ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 08/30] mips: lantiq: falcon: Fix refcount leak bug in sysctrl Greg Kroah-Hartman
2022-09-26 10:11 ` Greg Kroah-Hartman [this message]
2022-09-26 10:11 ` [PATCH 4.9 10/30] mips/pic32/pic32mzda: Fix refcount leak bugs Greg Kroah-Hartman
2022-09-26 10:40   ` Pavel Machek
2022-09-26 16:08     ` Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 11/30] mips: lantiq: Add missing of_node_put() in irq.c Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 12/30] arm: mach-spear: Add missing of_node_put() in time.c Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 13/30] wifi: mac80211: Fix UAF in ieee80211_scan_rx() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 14/30] USB: core: Fix RST error in hub.c Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 15/30] ALSA: hda/tegra: set depop delay for tegra Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 16/30] ALSA: hda: add Intel 5 Series / 3400 PCI DID Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 17/30] mm/slub: fix to return errno if kmalloc() fails Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 18/30] netfilter: nf_conntrack_sip: fix ct_sip_walk_headers Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 19/30] netfilter: nf_conntrack_irc: Tighten matching on DCC message Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 20/30] ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 21/30] net: team: Unsync device addresses on ndo_stop Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 22/30] MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 23/30] can: gs_usb: gs_can_open(): fix race dev->can.state condition Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 24/30] perf kcore_copy: Do not check /proc/modules is unchanged Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 25/30] net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 26/30] serial: Create uart_xmit_advance() Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 27/30] serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting Greg Kroah-Hartman
2022-09-26 10:11 ` [PATCH 4.9 28/30] s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.9 29/30] Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region Greg Kroah-Hartman
2022-09-26 10:12 ` [PATCH 4.9 30/30] ext4: make directory inode spreading reflect flexbg size Greg Kroah-Hartman
2022-09-26 13:35 ` [PATCH 4.9 00/30] 4.9.330-rc1 review Pavel Machek
2022-09-27  1:02 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220926100736.491653664@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=windhl@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).