diff options
Diffstat (limited to 'features/rt/printk-kmsg_dump-use-kmsg_dump_rewind.patch')
-rw-r--r-- | features/rt/printk-kmsg_dump-use-kmsg_dump_rewind.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/features/rt/printk-kmsg_dump-use-kmsg_dump_rewind.patch b/features/rt/printk-kmsg_dump-use-kmsg_dump_rewind.patch new file mode 100644 index 00000000..d63957e3 --- /dev/null +++ b/features/rt/printk-kmsg_dump-use-kmsg_dump_rewind.patch @@ -0,0 +1,41 @@ +From bc6b56661c0c00b39b105f6c1c2166c89f60070c Mon Sep 17 00:00:00 2001 +From: John Ogness <john.ogness@linutronix.de> +Date: Wed, 17 Feb 2021 18:23:16 +0100 +Subject: [PATCH 019/191] printk: kmsg_dump: use kmsg_dump_rewind + +kmsg_dump() is open coding the kmsg_dump_rewind(). Call +kmsg_dump_rewind() instead. + +Signed-off-by: John Ogness <john.ogness@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/printk/printk.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c +index fbb9f2f30430..15aed1a7bd05 100644 +--- a/kernel/printk/printk.c ++++ b/kernel/printk/printk.c +@@ -3351,7 +3351,6 @@ void kmsg_dump(enum kmsg_dump_reason reason) + { + struct kmsg_dumper_iter iter; + struct kmsg_dumper *dumper; +- unsigned long flags; + + rcu_read_lock(); + list_for_each_entry_rcu(dumper, &dump_list, list) { +@@ -3370,10 +3369,7 @@ void kmsg_dump(enum kmsg_dump_reason reason) + + /* initialize iterator with data about the stored records */ + iter.active = true; +- printk_safe_enter_irqsave(flags); +- iter.cur_seq = latched_seq_read_nolock(&clear_seq); +- iter.next_seq = prb_next_seq(prb); +- printk_safe_exit_irqrestore(flags); ++ kmsg_dump_rewind(&iter); + + /* invoke dumper which will iterate over records */ + dumper->dump(dumper, reason, &iter); +-- +2.19.1 + |