linux/drivers/net/can
Marc Kleine-Budde 6fdcd310f9 can: sun4i_can: sun4i_can_interrupt(): fix max irq loop handling
commit 76544beea7 upstream.

Reading the interrupt register `SUN4I_REG_INT_ADDR` causes all of its bits
to be reset. If we ever reach the condition of handling more than
`SUN4I_CAN_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: 0738eff14d ("can: Allwinner A10/A20 CAN Controller support - Kernel module")
Cc: stable@vger.kernel.org
Co-developed-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20251116-sun4i-fix-loop-v1-1-3d76d3f81950@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-12-07 06:09:34 +09:00
..
c_can can: c_can: Use of_property_present() to test existence of DT property 2025-06-04 14:38:01 +02:00
cc770 can: do not increase rx statistics when generating a CAN rx error message frame 2024-12-14 19:51:25 +01:00
dev can: dev: add generic function can_eth_ioctl_hwts() 2025-10-02 13:39:11 +02:00
ifi_canfd can: ifi_canfd: ifi_canfd_handle_lec_err(): fix {rx,tx}_errors statistics 2024-12-14 19:51:26 +01:00
m_can can: m_can: m_can_plat_remove(): add missing pm_runtime_disable() 2025-10-29 14:03:07 +01:00
mscan can: do not increase rx statistics when generating a CAN rx error message frame 2024-12-14 19:51:25 +01:00
peak_canfd can: do not increase rx statistics when generating a CAN rx error message frame 2024-12-14 19:51:25 +01:00
rcar can: rcar_can: rcar_can_resume(): fix s2ram with PSCI 2025-10-02 13:39:10 +02:00
sja1000 can: sja1000: fix max irq loop handling 2025-12-07 06:09:34 +09:00
softing can: softing: softing_startstop(): fix set but not used variable warning 2022-01-27 11:04:01 +01:00
spi can: hi311x: populate ndo_change_mtu() to prevent buffer overflow 2025-10-02 13:39:11 +02:00
usb can: kvaser_usb: leaf: Fix potential infinite loop in command parsers 2025-12-07 06:09:33 +09:00
at91_can.c can: do not increase rx statistics when generating a CAN rx error message frame 2024-12-14 19:51:25 +01:00
flexcan.c can: flexcan: disable transceiver during system PM 2025-04-10 14:32:05 +02:00
grcan.c can: grcan: grcan_probe(): remove extra of_node_get() 2022-07-12 16:34:48 +02:00
janz-ican3.c can: janz-ican3: use DEVICE_ATTR_RO/RW() helper macro 2021-07-25 11:36:26 +02:00
Kconfig can: flexcan: update Kconfig to enable coldfire 2021-07-25 11:36:29 +02:00
kvaser_pciefd.c can: kvaser_pciefd: Store device channel index 2025-08-28 16:24:08 +02:00
led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile can: dev: move driver related infrastructure into separate subdir 2021-01-13 09:42:58 +01:00
pch_can.c can: do not increase rx statistics when generating a CAN rx error message frame 2024-12-14 19:51:25 +01:00
slcan.c tty: no checking of tty_unregister_ldisc 2021-05-13 16:57:17 +02:00
sun4i_can.c can: sun4i_can: sun4i_can_interrupt(): fix max irq loop handling 2025-12-07 06:09:34 +09:00
ti_hecc.c can: rx-offload: add skb queue for use during ISR 2021-07-25 11:36:25 +02:00
vcan.c net: introduce CAN specific pointer in the struct net_device 2021-02-24 14:32:15 -08:00
vxcan.c net: validate veth and vxcan peer ifindexes 2023-08-30 16:18:14 +02:00
xilinx_can.c can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB 2025-10-02 13:39:03 +02:00