summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2020-09-10 12:24:53 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-01 13:18:14 +0200
commitc7be1f4d4e608564a5466903cea21fecf914fd96 (patch)
treef6fbc1768c94ffeb1b5c633edb09c1af8beca1db /kernel
parent43d750a0994ca8edb9f7695c779901592339482c (diff)
downloadlinux-stable-c7be1f4d4e608564a5466903cea21fecf914fd96.tar.gz
linux-stable-c7be1f4d4e608564a5466903cea21fecf914fd96.tar.bz2
linux-stable-c7be1f4d4e608564a5466903cea21fecf914fd96.zip
lockdep: fix order in trace_hardirqs_off_caller()
[ Upstream commit 73ac74c7d489756d2313219a108809921dbfaea1 ] Switch order so that locking state is consistent even if the IRQ tracer calls into lockdep again. Acked-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_preemptirq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
index 4d8e99fdbbbe..26b06b09c9f6 100644
--- a/kernel/trace/trace_preemptirq.c
+++ b/kernel/trace/trace_preemptirq.c
@@ -63,14 +63,14 @@ NOKPROBE_SYMBOL(trace_hardirqs_on_caller);
__visible void trace_hardirqs_off_caller(unsigned long caller_addr)
{
+ lockdep_hardirqs_off(CALLER_ADDR0);
+
if (!this_cpu_read(tracing_irq_cpu)) {
this_cpu_write(tracing_irq_cpu, 1);
tracer_hardirqs_off(CALLER_ADDR0, caller_addr);
if (!in_nmi())
trace_irq_disable_rcuidle(CALLER_ADDR0, caller_addr);
}
-
- lockdep_hardirqs_off(CALLER_ADDR0);
}
EXPORT_SYMBOL(trace_hardirqs_off_caller);
NOKPROBE_SYMBOL(trace_hardirqs_off_caller);