diff options
| author | Alban Bedel <alban.bedel@lht.dlh.de> | 2026-02-09 15:47:05 +0100 |
|---|---|---|
| committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2026-03-02 10:24:41 +0100 |
| commit | ab3f894de216f4a62adc3b57e9191888cbf26885 (patch) | |
| tree | af1e6d69ba6a0937ff09342b45b0e65887c243f0 /scripts/stackusage | |
| parent | c77bfbdd6aac31b152ee81522cd90ad1de18738f (diff) | |
| download | linux-ab3f894de216f4a62adc3b57e9191888cbf26885.tar.gz linux-ab3f894de216f4a62adc3b57e9191888cbf26885.zip | |
can: mcp251x: fix deadlock in error path of mcp251x_open
The mcp251x_open() function call free_irq() in its error path with the
mpc_lock mutex held. But if an interrupt already occurred the
interrupt handler will be waiting for the mpc_lock and free_irq() will
deadlock waiting for the handler to finish.
This issue is similar to the one fixed in commit 7dd9c26bd6cf ("can:
mcp251x: fix deadlock if an interrupt occurs during mcp251x_open") but
for the error path.
To solve this issue move the call to free_irq() after the lock is
released. Setting `priv->force_quit = 1` beforehand ensure that the IRQ
handler will exit right away once it acquired the lock.
Signed-off-by: Alban Bedel <alban.bedel@lht.dlh.de>
Link: https://patch.msgid.link/20260209144706.2261954-1-alban.bedel@lht.dlh.de
Fixes: bf66f3736a94 ("can: mcp251x: Move to threaded interrupts instead of workqueues.")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
