lkml.org 
[lkml]   [2006]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -rt 1/2] Dont blindly turn on interrupts in boot_override_clocksource
The boot_override_clocksource currently blindly turns on interrupts with
the releasing of the lock. But if you have clocksource=xxx in the
command line, this function is called before interrupts are setup,
and causes early exception errors.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Index: linux-2.6.16-rt23/kernel/time/clocksource.c
===================================================================
--- linux-2.6.16-rt23.orig/kernel/time/clocksource.c 2006-05-25 16:01:00.000000000 -0400
+++ linux-2.6.16-rt23/kernel/time/clocksource.c 2006-05-25 16:01:28.000000000 -0400
@@ -323,10 +323,11 @@ device_initcall(init_clocksource_sysfs);
*/
static int __init boot_override_clocksource(char* str)
{
- spin_lock_irq(&clocksource_lock);
+ unsigned long flags;
+ spin_lock_irqsave(&clocksource_lock, flags);
if (str)
strlcpy(override_name, str, sizeof(override_name));
- spin_unlock_irq(&clocksource_lock);
+ spin_unlock_irqrestore(&clocksource_lock, flags);
return 1;
}

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-26 18:13    [W:0.061 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site