summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0094-printk-kmsg_dump-use-kmsg_dump_rewind.patch
blob: 7600d18a8286fdba5605412f0162d33b57a0693e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 5d97623648d3bccef67abeab3048214f70c5b693 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 094/323] printk: kmsg_dump: use kmsg_dump_rewind
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.215-rt107.tar.xz

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 e18f1f09ab727..0d233c0573a50 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3385,7 +3385,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) {
@@ -3404,10 +3403,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.44.0