]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: stm32: Return IRQ_NONE in the ISR if no handling happend
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 17 Apr 2024 09:03:27 +0000 (11:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2024 15:11:39 +0000 (17:11 +0200)
commit9f9be0ec3130066c5c0bd85da260fa96ea46fd6a
tree337d7fcbf37e570df42d6e87aa27168782819215
parent52aaf1ff14622a04148dbb9ccce6d9de5d534ea7
serial: stm32: Return IRQ_NONE in the ISR if no handling happend

commit 13c785323b36b845300b256d0e5963c3727667d7 upstream.

If there is a stuck irq that the handler doesn't address, returning
IRQ_HANDLED unconditionally makes it impossible for the irq core to
detect the problem and disable the irq. So only return IRQ_HANDLED if
an event was handled.

A stuck irq is still problematic, but with this change at least it only
makes the UART nonfunctional instead of occupying the (usually only) CPU
by 100% and so stall the whole machine.

Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/5f92603d0dfd8a5b8014b2b10a902d91e0bb881f.1713344161.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c