Executive brief
The Linux kernel's ARM UART driver (amba-pl011) had a bug where its atomic-context console write function called a locking function that could sleep on PREEMPT_RT kernels. This could cause kernel crashes when debugging messages were printed from certain contexts. The fix ensures the console clock stays enabled during console availability instead of being toggled per-write, preventing the problematic lock acquisition.
Technical details
The vulnerability is a potential deadlock/BUG condition in pl011_console_write_atomic() on PREEMPT_RT kernels. The function ran in nbcon atomic context (where sleeping is forbidden) but called clk_enable(), which acquires a sleeping lock on RT systems. Additionally, write_atomic() can be invoked from NMI context where locking is unsafe. The fix moves clock management out of the per-write callbacks: clk_prepare_enable() is called during console setup and clk_disable_unprepare() during console exit, keeping the clock enabled while the console is active. For suspend/resume, the clock reference is released/restored around uart_suspend_port() / uart_resume_port() to allow clock gating when the port is actually suspended.
Affected products
- Linux Linux kernel affected ARM32 and arm64 DT SoCs with clk-backed pl011
Timeline
- 2026-09-17: disclosed