Re: [PATCH] v2 Re: Bug: Status/Summary of slashdot leap-second crash on new years 2008-2009

Chris Friesen
2009-06-18T23:49:18Z

Ben Hutchings wrote:
> On Thu, 2009-06-18 at 16:34 -0600, Chris Friesen wrote:

> Having investigated further, I believe it has been safe since this
> change made in 2.6.27 (which cleverly preempted the new year):
>
> commit b845b517b5e3706a3729f6ea83b88ab85f0725b0
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Fri Aug 8 21:47:09 2008 +0200
>
> printk: robustify printk
>
> Avoid deadlocks against rq->lock and xtime_lock by deferring the klogd
> wakeup by polling from the timer tick.
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
>> In addition, is it allowed for older kernels also or is Chris Adams'
>> patch something that should get picked up for the 2.6.27 stable series?
>
> Anything older than 2.6.27 appears to need a change along the lines of
> the above-mentioned commit or Chris's patch. Note that this was not the
> only case where printk() could be called under xtime_lock. For example,
> in arch/alpha/kernel/time.c timer_interrupt() calls set_rtc_mmss() which
> can call printk().

It appears that the patch in question went into mainline in 2.6.28-rc1
after being developed on the -tip tree. So it doesn't appear to be
present in the mainline 2.6.27 kernel.

Chris