[PATCH printk v2 1/2] printk/nbcon: Flush nbcon_irq_work in nbcon_free()
From: John Ogness
Date: Fri Aug 28 2026 - 10:08:38 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..218b1922a58de 100644
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -1849,6 +1849,8 @@ void nbcon_free(struct console *con)
printk_kthreads_running = false;
}
+ irq_work_sync(&con->irq_work);
+
nbcon_state_set(con, &state);
/* Boot consoles share global printk buffers. */
--
2.47.3