[PATCH printk v3 1/2] printk/nbcon: Flush nbcon_irq_work in nbcon_free()
From: John Ogness
Date: Tue Sep 01 2026 - 05:56:17 EST
Ensure any pending nbcon_irq_work is flushed before allowing the
console to be recycled.
Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
---
kernel/printk/nbcon.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
index a5921a84a80ed..68f77afee9106 100644
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -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);
--
2.47.3