Don't 'printk()' while holding xtime lock for writing

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 <marcin.slusarz@gmail.com>
Debugged-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+4
+4
kernel/time/timekeeping.c
··· 191 191 192 192 tick_clock_notify(); 193 193 194 + /* 195 + * We're holding xtime lock and waking up klogd would deadlock 196 + * us on enqueue. So no printing! 194 197 printk(KERN_INFO "Time: %s clocksource has been installed.\n", 195 198 clock->name); 199 + */ 196 200 } 197 201 #else 198 202 static inline void change_clocksource(void) { }