Re: [PATCH] Fix leap second message hang

From: Peter Zijlstra
Date: Fri Jan 09 2009 - 16:48:12 EST


On Fri, 2009-01-09 at 14:31 -0600, Chris Adams wrote:
> Resending this outside the big long thread to make sure it gets added
> (it isn't critical right now but I don't want to forget it).

Best way to get stuff added is to CC the right people -- loose patches
get lost easily.

> 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.

That should actually work these days, we don't actually do a direct wake
up anymore.

printk should work from all places, including holding rq->lock and
xtime_lock.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/