lkml.org 
[lkml]   [2009]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] v2 Re: Bug: Status/Summary of slashdot leap-second crash on new years 2008-2009
2009/1/3 Chris Adams <cmadams@hiwaay.net>:

>
> From: Chris Adams <cmadams@hiwaay.net>
>
> The code to handle leap seconds printks an information message when the
> second is inserted or deleted. It does this while holding xtime_lock.
> However, printk wakes up klogd, and in some cases, the scheduler tries
> to get the current kernel time, trying to get xtime_lock (which results
> in a deadlock). This moved the printks outside of the lock. It also
> adds a comment to not use printk while holding xtime_lock.
>
> Signed-off-by: Chris Adams <cmadams@hiwaay.net>

Acked-by: Linas Vepstas <linasvepstas@gmail.com>

BTW, I audited the other code in kernel/time/*.c and it looks like there
are no other printk's under the lock. Not surprising -- if there were,
they'd have been found by now. Indeed, in timekeeping.c line 198,
it seems that someone else had indeed tripped over this :-P
--linas


\
 
 \ /
  Last update: 2009-01-03 21:03    [from the cache]
©2003-2011 Jasper Spaans