printk/nbcon: Flush nbcon_irq_work in nbcon_free()

Ensure any pending nbcon_irq_work is flushed before allowing the
console to be recycled.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://patch.msgid.link/20260901093245.344455-2-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
John Ogness 2026-09-01 11:37:42 +02:06 committed by Petr Mladek
parent 77ae27fd98
commit 0433632bbe

View File

@ -1837,6 +1837,8 @@ void nbcon_free(struct console *con)
/* Synchronize the kthread stop. */
lockdep_assert_console_list_lock_held();
irq_work_sync(&con->irq_work);
if (printk_kthreads_running) {
nbcon_kthread_stop(con);