]> git.ipfire.org Git - thirdparty/linux.git/commit
serial: amba-pl011: cancel RS485 hrtimers after freeing IRQ
authorFan Wu <fanwu01@zju.edu.cn>
Fri, 31 Jul 2026 08:59:14 +0000 (08:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2026 14:31:19 +0000 (16:31 +0200)
commit36672c8d7d14e9c43287528455d2c97b526ea6ad
tree191dff30e9c995d884ff4879ab1ba3169f9c48bb
parentdcb2f7576ce460eb4f6b9048b7c266c8da5848a8
serial: amba-pl011: cancel RS485 hrtimers after freeing IRQ

The RS485 trigger hrtimers are embedded in the devm-managed port and can
fire after it is freed. The IRQ handler can arm a timer, so free the IRQ
first and then cancel both timers.

Complete the RS485 stop without arming a timer, and cancel the timers
in remove() for the suspend-then-unbind path, where shutdown is not
called.

This issue was found by an in-house static analysis tool.

Fixes: 2c1fd53af21b ("serial: amba-pl011: Fix RTS handling in RS485 mode")
Cc: stable <stable@kernel.org>
Assisted-by: Codex:gpt-5.6
Signed-off-by: Fan Wu <fanwu01@zju.edu.cn>
Link: https://patch.msgid.link/20260731085915.326775-3-fanwu01@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c