Re: [Kernel Bug] INFO: task hung in show_cons_active
From: Greg KH
Date: Mon Jun 22 2026 - 10:11:55 EST
On Mon, Jun 22, 2026 at 09:53:02PM +0800, Longxing Li wrote:
> Dear Linux kernel developers and maintainers,
>
> Thank you for the feedback. I've added some analysis on this bug, and
> also added the original report, which is at the bottom of this email.
>
> Analysis Summary:
>
> The hang involves two tasks blocking on console_sem while holding
> console_mutex, and a third task path (unregister_console) that
> acquires console_mutex and then blocks on console_sem via
> __pr_flush(). The core problem is a lock inversion: __pr_flush()
> blocks on console_sem while holding console_list_lock (->
> console_mutex).
>
> This can lead to a deadlock when any code path holds console_sem and
> subsequently needs console_mutex.
Great, can you create patches for this issue as you seem to be able to
reproduce the issue well? That way you get credit for the fix and we
can understand the proposal here much better.
thanks,
greg k-h