Skip to content

Commit b36e475

Browse files
Russell KingRussell King
authored andcommitted
[ARM] Fix kernel/fork.c for lockdep on ARM
ARM has interrupts enabled over context switches (iow, has __ARCH_WANT_INTERRUPTS_ON_CTXSW defined.) The lockdep code in fork.c assumes that interrupts are always disabled. Fix this wrong assumption by making the initialisation of 'p->hardirqs_enabled' depend on __ARCH_WANT_INTERRUPTS_ON_CTXSW. Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 7ad1bcb commit b36e475

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/fork.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
10561056
#endif
10571057
#ifdef CONFIG_TRACE_IRQFLAGS
10581058
p->irq_events = 0;
1059+
#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
1060+
p->hardirqs_enabled = 1;
1061+
#else
10591062
p->hardirqs_enabled = 0;
1063+
#endif
10601064
p->hardirq_enable_ip = 0;
10611065
p->hardirq_enable_event = 0;
10621066
p->hardirq_disable_ip = _THIS_IP_;

0 commit comments

Comments
 (0)