stable.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,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Marc Zyngier <marc.zyngier@arm.com>
Subject: [PATCH 4.4 15/20] irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup()
Date: Tue, 22 Aug 2017 12:09:58 -0700	[thread overview]
Message-ID: <20170822190915.972223307@linuxfoundation.org> (raw)
In-Reply-To: <20170822190915.345029476@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Boris Brezillon <boris.brezillon@free-electrons.com>

commit 277867ade8262583f4280cadbe90e0031a3706a7 upstream.

of_find_compatible_node() is calling of_node_put() on its first argument
thus leading to an unbalanced of_node_get/put() issue if the node has not
been retained before that.

Instead of passing the root node, pass NULL, which does exactly the same:
iterate over all DT nodes, starting from the root node.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Fixes: 3d61467f9bab ("irqchip: atmel-aic: Implement RTC irq fixup")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/irqchip/irq-atmel-aic-common.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/irqchip/irq-atmel-aic-common.c
+++ b/drivers/irqchip/irq-atmel-aic-common.c
@@ -148,9 +148,9 @@ void __init aic_common_rtc_irq_fixup(str
 	struct device_node *np;
 	void __iomem *regs;
 
-	np = of_find_compatible_node(root, NULL, "atmel,at91rm9200-rtc");
+	np = of_find_compatible_node(NULL, NULL, "atmel,at91rm9200-rtc");
 	if (!np)
-		np = of_find_compatible_node(root, NULL,
+		np = of_find_compatible_node(NULL, NULL,
 					     "atmel,at91sam9x5-rtc");
 
 	if (!np)

  parent reply	other threads:[~2017-08-22 19:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 19:09 [PATCH 4.4 00/20] 4.4.84-stable review Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 01/20] netfilter: nf_ct_ext: fix possible panic after nf_ct_extend_unregister Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 02/20] audit: Fix use after free in audit_remove_watch_rule() Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 03/20] parisc: pci memory bar assignment fails with 64bit kernels on dino/cujo Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 04/20] crypto: x86/sha1 - Fix reads beyond the number of blocks passed Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 05/20] Input: elan_i2c - add ELAN0608 to the ACPI table Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 06/20] Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 07/20] ALSA: seq: 2nd attempt at fixing race creating a queue Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 08/20] ALSA: usb-audio: Apply sample rate quirk to Sennheiser headset Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 09/20] ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 10/20] mm/mempolicy: fix use after free when calling get_mempolicy Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 11/20] mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 13/20] x86/asm/64: Clear AC on NMI entries Greg Kroah-Hartman
2017-08-22 19:09 ` [PATCH 4.4 14/20] irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup() Greg Kroah-Hartman
2017-08-22 19:09 ` Greg Kroah-Hartman [this message]
2017-08-22 19:09 ` [PATCH 4.4 16/20] Sanitize move_pages() permission checks Greg Kroah-Hartman
2017-08-22 19:10 ` [PATCH 4.4 17/20] pids: make task_tgid_nr_ns() safe Greg Kroah-Hartman
2017-08-22 19:10 ` [PATCH 4.4 18/20] perf/x86: Fix LBR related crashes on Intel Atom Greg Kroah-Hartman
2017-08-22 19:10 ` [PATCH 4.4 19/20] usb: optimize acpi companion search for usb port devices Greg Kroah-Hartman
2017-08-22 19:10 ` [PATCH 4.4 20/20] usb: qmi_wwan: add D-Link DWM-222 device ID Greg Kroah-Hartman
2017-08-23  0:36 ` [PATCH 4.4 00/20] 4.4.84-stable review Shuah Khan
2017-08-27 16:57 ` Guenter Roeck

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=20170822190915.972223307@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=stable@vger.kernel.org \
    /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).