CVE-2026-138984: mfd: da903x: Cancel IRQ work during teardown
In the Linux kernel, the following vulnerability has been resolved:
mfd: da903x: Cancel IRQ work during teardown
The IRQ handler disables the IRQ and schedules irqwork. Releasing the IRQ does not drain that work, which can continue to use the devm-allocated chip and notifier state.
Manage both IRQ-work cancellation and subdevice removal with devres. Register the subdevice-removal action before requesting the IRQ, then add the IRQ-work action after the request. This avoids leaving a live IRQ without work cancellation if action registration fails. Devres cleanup then disables the IRQ and drains the work before releasing the IRQ and removing child devices. Register both actions before creating the children so partial probe failures use the same ordering.
This issue was found by the author's in-house static analysis tool. The patch was reviewed by the author against the latest mainline tree.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In mfd: da903x, manage IRQ-work cancellation and subdevice removal with devres: register the subdevice-removal action before requesting the IRQ, then register the IRQ-work action after the request and before creating children. During teardown, disable the IRQ and drain the work before releasing the IRQ and removing child devices.