summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0031-printk-Atomic-print-in-printk-context-on-shutdown.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:37 +0000
commit85f603d4fd6d85c425502723a17daa94574977de (patch)
tree188a21432c3b8e8ddb8a08e9a09397164a88181c /debian/patches-rt/0031-printk-Atomic-print-in-printk-context-on-shutdown.patch
parentMerging upstream version 6.9.7. (diff)
downloadlinux-85f603d4fd6d85c425502723a17daa94574977de.tar.xz
linux-85f603d4fd6d85c425502723a17daa94574977de.zip
Adding debian version 6.9.7-1.debian/6.9.7-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0031-printk-Atomic-print-in-printk-context-on-shutdown.patch')
-rw-r--r--debian/patches-rt/0031-printk-Atomic-print-in-printk-context-on-shutdown.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches-rt/0031-printk-Atomic-print-in-printk-context-on-shutdown.patch b/debian/patches-rt/0031-printk-Atomic-print-in-printk-context-on-shutdown.patch
new file mode 100644
index 0000000000..7c515605a7
--- /dev/null
+++ b/debian/patches-rt/0031-printk-Atomic-print-in-printk-context-on-shutdown.patch
@@ -0,0 +1,40 @@
+From: John Ogness <john.ogness@linutronix.de>
+Date: Mon, 23 Oct 2023 17:43:48 +0000
+Subject: [PATCH 31/46] printk: Atomic print in printk context on shutdown
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.9/older/patches-6.9-rt5.tar.xz
+
+For nbcon consoles, normally the printing is handled by the
+dedicated console printing threads. However, on shutdown the
+printing threads may not get a chance to print the final
+messages.
+
+When shutting down or rebooting (system_state > SYSTEM_RUNNING),
+perform atomic printing from the printk() caller context.
+
+Signed-off-by: John Ogness <john.ogness@linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ kernel/printk/printk.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/kernel/printk/printk.c
++++ b/kernel/printk/printk.c
+@@ -2389,12 +2389,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/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_pending();
++ }
+ }
+
+ if (do_trylock_unlock) {