projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2532dd
)
Don't 'printk()' while holding xtime lock for writing
author
Linus Torvalds
<
[email protected]
>
Mon, 24 Mar 2008 18:07:15 +0000
(11:07 -0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 24 Mar 2008 18:07:15 +0000
(11:07 -0700)
The printk() can deadlock because it can wake up klogd(), and
task enqueueing will try to read the time in order to set a hrtimer.
Reported-by: Marcin Slusarz <
[email protected]
>
Debugged-by: Peter Zijlstra <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/time/timekeeping.c
patch
|
blob
|
history
diff --git
a/kernel/time/timekeeping.c
b/kernel/time/timekeeping.c
index 671af612b7684ed27578ae3db8445f71f3499059..a3fa587c350c598063a17c903beeee99fe0f47e0 100644
(file)
--- a/
kernel/time/timekeeping.c
+++ b/
kernel/time/timekeeping.c
@@
-191,8
+191,12
@@
static void change_clocksource(void)
tick_clock_notify();
+ /*
+ * We're holding xtime lock and waking up klogd would deadlock
+ * us on enqueue. So no printing!
printk(KERN_INFO "Time: %s clocksource has been installed.\n",
clock->name);
+ */
}
#else
static inline void change_clocksource(void) { }