[lkml]   [2007]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 16/59] start_kernel: test if irqs got enabled early, barf, and disable them again
-stable review patch.  If anyone has any objections, please let us know.
From: Ard van Breemen <>

The calls made by parse_parms to other initialization code might enable
interrupts again way too early.

Having interrupts on this early can make systems PANIC when they initialize
the IRQ controllers (which happens later in the code). This patch detects
that irq's are enabled again, barfs about it and disables them again as a
safety net.

[ cleanups]
Signed-off-by: Ard van Breemen <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Chris Wright <>
This is half of the fix for
init/main.c | 5 +++++
1 file changed, 5 insertions(+)
--- linux-
+++ linux-
@@ -525,6 +525,11 @@ asmlinkage void __init start_kernel(void
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,
+ if (!irqs_disabled()) {
+ printk(KERN_WARNING "start_kernel(): bug: interrupts were "
+ "enabled *very* early, fixing it\n");
+ local_irq_disable();
+ }
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-02-03 03:39    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean