devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] of: irq: Fixes refcount issues with of_irq_parse_one()/of_irq_parse_raw()
@ 2023-03-01 18:52 Jean-Jacques Hiblot
  2023-03-01 18:52 ` [PATCH 1/3] of: irq: make callers of of_irq_parse_raw() release the device node Jean-Jacques Hiblot
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jean-Jacques Hiblot @ 2023-03-01 18:52 UTC (permalink / raw)
  To: saravanak, clement.leger, Geert Uytterhoeven, Magnus Damm,
	Russell King, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	zajec5, Daniel Lezcano, Thomas Gleixner, Claudiu Beznea,
	Marc Zyngier, afaerber, Manivannan Sadhasivam, Palmer Dabbelt,
	Paul Walmsley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Rob Herring, Frank Rowand, Bjorn Helgaas, Nishanth Menon,
	ssantosh, mathias.nyman, gregkh, thierry.reding, jonathanh
  Cc: linux-renesas-soc, linux-arm-kernel, linux-kernel, linuxppc-dev,
	linux-wireless, linux-actions, linux-riscv, linux-sunxi,
	devicetree, linux-pci, linux-usb, linux-tegra,
	Jean-Jacques Hiblot

This series attempts to fix refcounting issues related to of_irq_parse_one()
and of_irq_parse_raw().

The first issue is simply that most callers of of_irq_parse_one() and
of_irq_parse_raw() don't call of_node_put() on the returned device node when
they no longer need it.

The second issue is a double get() happening in of_irq_parse_one() when
parsing the "interrupts-extended" properties.

WARNING: I tried to be careful when modifying the callers of
of_irq_parse_one()/of_irq_parse_raw() but haven't test-build all the changes.


Jean-Jacques Hiblot (3):
  of: irq: make callers of of_irq_parse_raw() release the device node
  of: irq: make callers of of_irq_parse_one() release the device node
  of: irq: release the node after looking up for "interrupts-extended"

 .../mach-shmobile/regulator-quirk-rcar-gen2.c |  1 +
 arch/powerpc/platforms/fsl_uli1575.c          |  1 +
 arch/powerpc/sysdev/mpic_msi.c                |  1 +
 drivers/bcma/main.c                           |  5 +++-
 drivers/clocksource/timer-clint.c             |  1 +
 drivers/irqchip/irq-mchp-eic.c                |  1 +
 drivers/irqchip/irq-owl-sirq.c                |  1 +
 drivers/irqchip/irq-renesas-rzg2l.c           |  1 +
 drivers/irqchip/irq-sifive-plic.c             |  1 +
 drivers/irqchip/irq-sun6i-r.c                 |  2 ++
 drivers/of/irq.c                              | 30 ++++++++++++++-----
 drivers/of/unittest.c                         |  7 +++++
 drivers/pci/of.c                              |  6 +++-
 drivers/soc/ti/knav_qmss_queue.c              |  3 ++
 drivers/usb/host/xhci-tegra.c                 |  1 +
 15 files changed, 53 insertions(+), 9 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-04 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-01 18:52 [PATCH 0/3] of: irq: Fixes refcount issues with of_irq_parse_one()/of_irq_parse_raw() Jean-Jacques Hiblot
2023-03-01 18:52 ` [PATCH 1/3] of: irq: make callers of of_irq_parse_raw() release the device node Jean-Jacques Hiblot
2023-03-01 18:52 ` [PATCH 2/3] of: irq: make callers of of_irq_parse_one() " Jean-Jacques Hiblot
2023-03-02  7:49   ` Geert Uytterhoeven
2023-03-04 10:34     ` Jean-Jacques Hiblot
2023-03-04 14:47       ` Geert Uytterhoeven
2023-03-01 18:52 ` [PATCH 3/3] of: irq: release the node after looking up for "interrupts-extended" Jean-Jacques Hiblot
2023-03-01 21:00   ` Rob Herring

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).