From: Zhipeng.wang_1@oss.nxp.com
To: Thomas Gleixner <tglx@kernel.org>, Marc Zyngier <maz@kernel.org>,
Frank Li <Frank.Li@nxp.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Jindong Yue <jindong.yue@nxp.com>,
xuegang.liu@nxp.com, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/4] irqchip/imx-irqsteer: Allow building as module
Date: Fri, 7 Aug 2026 16:23:42 +0900 [thread overview]
Message-ID: <20260807072346.1222389-1-Zhipeng.wang_1@oss.nxp.com> (raw)
From: Zhipeng Wang <zhipeng.wang_1@nxp.com>
This series makes the i.MX IRQSTEER driver buildable as a module.
v2 was a single patch that folded the module conversion together with
the unload-path fixes. Following review, v3 splits it into four logical
changes: three fixes for pre-existing bugs that only become reachable
once the driver can be unbound/reloaded, followed by the module
conversion itself.
The three fixes address the module-related issues raised on v2:
- Sashiko AI reported an irq_domain leak on the probe() error path that
turns into a use-after-free once the module can be unloaded. Patch
1/4 fixes the error path.
- The IRQ mappings created in probe() were leaked on unload, and the
child irq_descs kept pointing at the driver's irq_chip past
irq_domain_remove(). Patch 2/4 disposes of them in remove().
- Sashiko AI reported an interrupt storm on module reload because the
CHANMASK registers retain their previous state. Patch 3/4 masks all
interrupts in probe() and remove().
Patch 4/4 then converts the driver to a module. Per Frank Li's review,
it lets devres own the clock and runtime PM
(devm_clk_get_enabled() + devm_pm_runtime_set_active_enabled()) instead
of hand-balancing them in remove(), which also drops the manual
pm_runtime_get_sync()/clk_disable_unprepare() dance from the v2 remove().
The two remaining pre-existing handler issues Sashiko AI flagged (the
missing chained_irq_exit() on the handler error path, and register
access while runtime-suspended) are unrelated to module enablement and
are out of scope for this series; the chained_irq_exit() fix is sent
separately.
Changes in v3:
- Split the single v2 patch into four patches.
- Add the probe() error-path fix as patch 1/4 (Sashiko AI).
- Add CHANMASK masking in probe()/remove() as patch 3/4 (Sashiko AI).
- In the module conversion, let devres own the clock and runtime PM via
devm_clk_get_enabled() and devm_pm_runtime_set_active_enabled(),
dropping the manual runtime-PM/clock balancing from the v2 remove()
(Frank Li).
v2: https://lore.kernel.org/r/20260728092219.525449-1-Zhipeng.wang_1@oss.nxp.com
v1: https://lore.kernel.org/r/20260724090136.3595894-1-Zhipeng.wang_1@oss.nxp.com
Jindong Yue (1):
irqchip/imx-irqsteer: Allow building as module
Zhipeng Wang (3):
irqchip/imx-irqsteer: Fix error handling path in probe()
irqchip/imx-irqsteer: Dispose of IRQ mappings in remove()
irqchip/imx-irqsteer: Mask all interrupts in probe() and remove()
drivers/irqchip/Kconfig | 2 +-
drivers/irqchip/irq-imx-irqsteer.c | 60 ++++++++++++++++++++----------
2 files changed, 41 insertions(+), 21 deletions(-)
base-commit: c0a27675eaf08255017b3cabc28c99c0cd71f468
--
2.34.1
next reply other threads:[~2026-08-07 7:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 7:23 Zhipeng.wang_1 [this message]
2026-08-07 7:23 ` [PATCH v3 1/4] irqchip/imx-irqsteer: Fix error handling path in probe() Zhipeng.wang_1
2026-08-07 19:01 ` Frank Li
2026-08-07 7:23 ` [PATCH v3 2/4] irqchip/imx-irqsteer: Dispose of IRQ mappings in remove() Zhipeng.wang_1
2026-08-07 19:11 ` Frank Li
2026-08-07 7:23 ` [PATCH v3 3/4] irqchip/imx-irqsteer: Mask all interrupts in probe() and remove() Zhipeng.wang_1
2026-08-07 19:14 ` Frank Li
2026-08-07 7:23 ` [PATCH v3 4/4] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
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=20260807072346.1222389-1-Zhipeng.wang_1@oss.nxp.com \
--to=zhipeng.wang_1@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jindong.yue@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=tglx@kernel.org \
--cc=xuegang.liu@nxp.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