Skip to content

Commit c7be1f4

Browse files
svens-s390gregkh
authored andcommitted
lockdep: fix order in trace_hardirqs_off_caller()
[ Upstream commit 73ac74c ] Switch order so that locking state is consistent even if the IRQ tracer calls into lockdep again. Acked-by: Peter Zijlstra <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 43d750a commit c7be1f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/trace/trace_preemptirq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ NOKPROBE_SYMBOL(trace_hardirqs_on_caller);
6363

6464
__visible void trace_hardirqs_off_caller(unsigned long caller_addr)
6565
{
66+
lockdep_hardirqs_off(CALLER_ADDR0);
67+
6668
if (!this_cpu_read(tracing_irq_cpu)) {
6769
this_cpu_write(tracing_irq_cpu, 1);
6870
tracer_hardirqs_off(CALLER_ADDR0, caller_addr);
6971
if (!in_nmi())
7072
trace_irq_disable_rcuidle(CALLER_ADDR0, caller_addr);
7173
}
72-
73-
lockdep_hardirqs_off(CALLER_ADDR0);
7474
}
7575
EXPORT_SYMBOL(trace_hardirqs_off_caller);
7676
NOKPROBE_SYMBOL(trace_hardirqs_off_caller);

0 commit comments

Comments
 (0)