summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0034-printk-Atomic-print-in-printk-context-on-shutdown.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches-rt/0034-printk-Atomic-print-in-printk-context-on-shutdown.patch (renamed from debian/patches-rt/0038-printk-Atomic-print-in-printk-context-on-shutdown.patch)15
1 files changed, 7 insertions, 8 deletions
diff --git a/debian/patches-rt/0038-printk-Atomic-print-in-printk-context-on-shutdown.patch b/debian/patches-rt/0034-printk-Atomic-print-in-printk-context-on-shutdown.patch
index 1f51022ae4..68b58b5f41 100644
--- a/debian/patches-rt/0038-printk-Atomic-print-in-printk-context-on-shutdown.patch
+++ b/debian/patches-rt/0034-printk-Atomic-print-in-printk-context-on-shutdown.patch
@@ -1,7 +1,7 @@
From: John Ogness <john.ogness@linutronix.de>
Date: Mon, 23 Oct 2023 17:43:48 +0000
-Subject: [PATCH 38/50] printk: Atomic print in printk context on shutdown
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.7/older/patches-6.7-rt6.tar.xz
+Subject: [PATCH 34/48] printk: Atomic print in printk context on shutdown
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.8/older/patches-6.8.2-rt11.tar.xz
For nbcon consoles, normally the printing is handled by the
dedicated console printing threads. However, on shutdown the
@@ -19,22 +19,21 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
-@@ -2388,13 +2388,18 @@ asmlinkage int vprintk_emit(int facility
+@@ -2402,12 +2402,17 @@ asmlinkage int vprintk_emit(int facility
*
* - When this CPU is in panic.
*
+ * - During shutdown, since the printing threads may not get
+ * a chance to print the final messages.
+ *
- * Note that if boot consoles are registered, the
- * console_lock/console_unlock dance must be relied upon
- * instead because nbcon consoles cannot print simultaneously
- * with boot consoles.
+ * Note that if boot consoles are registered, the console
+ * lock/unlock dance must be relied upon instead because nbcon
+ * consoles cannot print simultaneously with boot consoles.
*/
- if (is_panic_context)
+ if (is_panic_context ||
+ (system_state > SYSTEM_RUNNING)) {
- nbcon_atomic_flush_all();
+ nbcon_atomic_flush_pending();
+ }
}