Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Hardware interrupt is requested before hardware initialization and Runtime PM enablement, creating a window for an immediate IRQ storm.
--
--- Patch [8]: [PATCH v2 08/13] dmaengine: ste_dma40: Fix probe IRQ leak ---
commit e1b29c17ec30abafeb3d5100e10a174f78b73842
Author: Linus Walleij <[email protected]>
dmaengine: ste_dma40: Fix probe IRQ leak
This commit fixes an IRQ leak in the probe error paths of the ste_dma40 driver
by tracking whether the IRQ was successfully requested and freeing it during
failure teardown.
Reported-by: [email protected]
Closes: https://lore.kernel.org/dmaengine/[email protected]/
Assisted-by: Codex:gpt-5-5
Signed-off-by: Linus Walleij <[email protected]>
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 0c9094b4c4ade..8cf73b37f8bfd 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
[ ... ]
> @@ -3605,6 +3606,7 @@ static int __init d40_probe(struct platform_device *pdev)
> d40_err(dev, "No IRQ defined\n");
> goto destroy_cache;
> }
> + irq_requested = true;
[Severity: High]
This is a pre-existing issue, but does requesting the IRQ here create a
window for an immediate interrupt storm?
The interrupt is requested in d40_probe() before hardware initialization
(d40_hw_init()) and Runtime PM enablement (pm_runtime_enable()). If the
hardware interrupt is already asserted (for example, if left pending by a
bootloader), it will fire immediately.
Inside d40_handle_interrupt(), the handler checks Runtime PM status:
drivers/dma/ste_dma40.c:d40_handle_interrupt() {
...
ret = pm_runtime_get_if_active(base->dev);
if (ret <= 0)
return IRQ_NONE;
...
}
Since pm_runtime_set_active() and pm_runtime_enable() have not yet been
executed in d40_probe(), Runtime PM is inactive. This causes the check to
fail, returning IRQ_NONE without servicing or clearing the hardware
interrupt.
For level-triggered interrupts, could this lead to an unhandled interrupt
storm that permanently disables the device's IRQ line?
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.