From b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:06:00 +0200 Subject: Adding debian version 5.10.209-2. Signed-off-by: Daniel Baumann --- ...sole-remove-unnecessary-safe-buffer-usage.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 debian/patches-rt/0095-printk-console-remove-unnecessary-safe-buffer-usage.patch (limited to 'debian/patches-rt/0095-printk-console-remove-unnecessary-safe-buffer-usage.patch') diff --git a/debian/patches-rt/0095-printk-console-remove-unnecessary-safe-buffer-usage.patch b/debian/patches-rt/0095-printk-console-remove-unnecessary-safe-buffer-usage.patch new file mode 100644 index 000000000..2b93c47dd --- /dev/null +++ b/debian/patches-rt/0095-printk-console-remove-unnecessary-safe-buffer-usage.patch @@ -0,0 +1,48 @@ +From 259c5c359d06d8bbbddebc6cc12fc2abc6bb2783 Mon Sep 17 00:00:00 2001 +From: John Ogness +Date: Wed, 17 Feb 2021 18:28:05 +0100 +Subject: [PATCH 095/323] printk: console: remove unnecessary safe buffer usage +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz + +Upon registering a console, safe buffers are activated when setting +up the sequence number to replay the log. However, these are already +protected by @console_sem and @syslog_lock. Remove the unnecessary +safe buffer usage. + +Signed-off-by: John Ogness +--- + kernel/printk/printk.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index c553b235d068..aebc9e31b36a 100644 +--- a/kernel/printk/printk.c ++++ b/kernel/printk/printk.c +@@ -2970,9 +2970,7 @@ void register_console(struct console *newcon) + /* + * console_unlock(); will print out the buffered messages + * for us. +- */ +- printk_safe_enter_irqsave(flags); +- /* ++ * + * We're about to replay the log buffer. Only do this to the + * just-registered console to avoid excessive message spam to + * the already-registered consoles. +@@ -2985,11 +2983,9 @@ void register_console(struct console *newcon) + exclusive_console_stop_seq = console_seq; + + /* Get a consistent copy of @syslog_seq. */ +- raw_spin_lock(&syslog_lock); ++ raw_spin_lock_irqsave(&syslog_lock, flags); + console_seq = syslog_seq; +- raw_spin_unlock(&syslog_lock); +- +- printk_safe_exit_irqrestore(flags); ++ raw_spin_unlock_irqrestore(&syslog_lock, flags); + } + console_unlock(); + console_sysfs_notify(); +-- +2.43.0 + -- cgit v1.2.3