Thread (3 messages) 3 messages, 2 authors, 6d ago

Re: [PATCH net] net: emac: mal: replace devm_request_irq with request_irq to fix probe error race

From: Rosen Penev <hidden>
Date: 2026-07-03 18:41:11
Also in: lkml

On Fri, Jul 3, 2026 at 9:38 AM Andrew Lunn [off-list ref] wrote:
On Thu, Jul 02, 2026 at 04:50:45PM -0700, Rosen Penev wrote:
quoted
devm_request_irq() is a managed resource: the IRQ is not freed until
devres_release_all() runs after the probe function returns.  In the
probe error path, free_netdev(mal->dummy_dev) and dcr_unmap() execute
while the IRQ is still live.  If the shared IRQ fires during cleanup,
the handler accesses unmapped DCR registers (crash) or the already-
freed dummy_dev (use-after-free).

Switch to plain request_irq() with per-IRQ error labels that tear down
only the IRQs that were successfully registered, and add the matching
free_irq() calls in mal_remove().

Fixes: 14f59154ff0b ("net: ibm: emac: mal: use devm for request_irq")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <redacted>
You seemed to of sent the same patch within 24 hours. Please don't do
that.
Yeah local error. Sent within a few seconds of each other.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

Send a self NACK to the broken version, wait 24 hours, and send v2.

    Andrew

---
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help