summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0021-printk-nbcon-Add-unsafe-flushing-on-panic.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0021-printk-nbcon-Add-unsafe-flushing-on-panic.patch')
-rw-r--r--debian/patches-rt/0021-printk-nbcon-Add-unsafe-flushing-on-panic.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/debian/patches-rt/0021-printk-nbcon-Add-unsafe-flushing-on-panic.patch b/debian/patches-rt/0021-printk-nbcon-Add-unsafe-flushing-on-panic.patch
index 7b79f9d743..424d8dc3f1 100644
--- a/debian/patches-rt/0021-printk-nbcon-Add-unsafe-flushing-on-panic.patch
+++ b/debian/patches-rt/0021-printk-nbcon-Add-unsafe-flushing-on-panic.patch
@@ -1,7 +1,7 @@
From: John Ogness <john.ogness@linutronix.de>
Date: Fri, 20 Oct 2023 10:03:42 +0000
-Subject: [PATCH 21/46] printk: nbcon: Add unsafe flushing on panic
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.9/older/patches-6.9-rt5.tar.xz
+Subject: [PATCH 21/48] printk: nbcon: Add unsafe flushing on panic
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.10/older/patches-6.10.2-rt14.tar.xz
Add nbcon_atomic_flush_unsafe() to flush all nbcon consoles
using the write_atomic() callback and allowing unsafe hostile
@@ -24,15 +24,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
-@@ -197,6 +197,7 @@ extern asmlinkage void dump_stack(void)
- void printk_trigger_flush(void);
- extern bool nbcon_driver_try_acquire(struct console *con);
- extern void nbcon_driver_release(struct console *con);
+@@ -198,6 +198,7 @@ void printk_trigger_flush(void);
+ void console_replay_all(void);
+ extern bool nbcon_device_try_acquire(struct console *con);
+ extern void nbcon_device_release(struct console *con);
+void nbcon_atomic_flush_unsafe(void);
#else
static inline __printf(1, 0)
int vprintk(const char *s, va_list args)
-@@ -286,6 +287,10 @@ static inline void nbcon_driver_release(
+@@ -291,6 +292,10 @@ static inline void nbcon_device_release(
{
}
@@ -45,7 +45,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
bool this_cpu_in_panic(void);
--- a/kernel/panic.c
+++ b/kernel/panic.c
-@@ -457,6 +457,7 @@ void panic(const char *fmt, ...)
+@@ -456,6 +456,7 @@ void panic(const char *fmt, ...)
* Explicitly flush the kernel log buffer one last time.
*/
console_flush_on_panic(CONSOLE_FLUSH_PENDING);
@@ -81,7 +81,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!nbcon_context_try_acquire(ctxt))
return -EPERM;
-@@ -1100,13 +1103,15 @@ static int __nbcon_atomic_flush_pending_
+@@ -1101,13 +1104,15 @@ static int __nbcon_atomic_flush_pending_
* write_atomic() callback
* @con: The nbcon console to flush
* @stop_seq: Flush up until this record
@@ -98,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{
unsigned long flags;
int err;
-@@ -1120,7 +1125,7 @@ static void nbcon_atomic_flush_pending_c
+@@ -1121,7 +1126,7 @@ static void nbcon_atomic_flush_pending_c
*/
local_irq_save(flags);
@@ -107,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
local_irq_restore(flags);
-@@ -1144,8 +1149,9 @@ static void nbcon_atomic_flush_pending_c
+@@ -1151,8 +1156,9 @@ static void nbcon_atomic_flush_pending_c
* __nbcon_atomic_flush_pending - Flush all nbcon consoles using their
* write_atomic() callback
* @stop_seq: Flush up until this record
@@ -118,7 +118,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{
struct console *con;
int cookie;
-@@ -1163,7 +1169,7 @@ static void __nbcon_atomic_flush_pending
+@@ -1170,7 +1176,7 @@ static void __nbcon_atomic_flush_pending
if (nbcon_seq_read(con) >= stop_seq)
continue;
@@ -127,7 +127,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
console_srcu_read_unlock(cookie);
}
-@@ -1178,7 +1184,19 @@ static void __nbcon_atomic_flush_pending
+@@ -1185,7 +1191,19 @@ static void __nbcon_atomic_flush_pending
*/
void nbcon_atomic_flush_pending(void)
{
@@ -148,7 +148,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
/**
-@@ -1307,7 +1325,7 @@ void nbcon_driver_release(struct console
+@@ -1315,7 +1333,7 @@ void nbcon_device_release(struct console
cookie = console_srcu_read_lock();
if (console_is_usable(con, console_srcu_read_flags(con)) &&
prb_read_valid(prb, nbcon_seq_read(con), NULL)) {