]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: sja1000: fix max irq loop handling
authorThomas Mühlbacher <tmuehlbacher@posteo.net>
Sat, 15 Nov 2025 15:34:56 +0000 (15:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:24:59 +0000 (06:24 +0900)
commit0f7213b8fbc66f6c903088c171e89df734096b2e
tree072d02dd610c4fd845dbbc01eb83c1480eb44496
parent2fa09fe98ca3b114d66285f65f7e108fea131815
can: sja1000: fix max irq loop handling

commit 30db4451c7f6aabcada029b15859a76962ec0cf8 upstream.

Reading the interrupt register `SJA1000_IR` causes all of its bits to be
reset. If we ever reach the condition of handling more than
`SJA1000_MAX_IRQ` IRQs, we will have read the register and reset all its
bits but without actually handling the interrupt inside of the loop
body.

This may, among other issues, cause us to never `netif_wake_queue()`
again after a transmission interrupt.

Fixes: 429da1cc841b ("can: Driver for the SJA1000 CAN controller")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20251115153437.11419-1-tmuehlbacher@posteo.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/sja1000/sja1000.c