RE: [PATCH] printk: fixing the deadlock when calling printk in nmihandle

From: Peter Zijlstra
Date: Wed Jul 04 2012 - 09:39:44 EST


On Wed, 2012-07-04 at 13:30 +0000, Liu, Chuansheng wrote:
> > Yuck.. and no. This makes sane things like early 8250 serial console less
> > reliable.
> Peter, could you share more?

You avoid calling console write, this delays writing the output, this
delay might be infinite if the machine is sick enough.

Things like the 8250 early console don't take locks and are fine to
call.

> I took many time to dig out this issue.

Well, it was a known issue..

> Anyway, in nmi handler, calling printk is dangerous. This patch is for this case.

But its ugly and decreases reliability.. Your 'solution' is to
basically ignore serialization and pray, that's not a solution, that's
gambling.

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