]> err.no Git - linux-2.6/commitdiff
[ARM] Fix kernel/fork.c for lockdep on ARM
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 27 Aug 2006 11:26:34 +0000 (12:26 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 20 Sep 2006 13:58:35 +0000 (14:58 +0100)
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>
kernel/fork.c

index f9b014e3e7002e243ca8120f8f81aa33bf0f0f81..8f76adf1c6a638c7d0f1f6c45c7da0bb6cb2cbc5 100644 (file)
@@ -1056,7 +1056,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 #endif
 #ifdef CONFIG_TRACE_IRQFLAGS
        p->irq_events = 0;
+#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
+       p->hardirqs_enabled = 1;
+#else
        p->hardirqs_enabled = 0;
+#endif
        p->hardirq_enable_ip = 0;
        p->hardirq_enable_event = 0;
        p->hardirq_disable_ip = _THIS_IP_;