Re: [PATCH -rt] printk: Don't emit console_cpu_notify() for CPU_DYING
From: Yong Zhang <hidden>
Date: 2011-11-17 05:29:19
Also in:
lkml
From: Yong Zhang <hidden>
Date: 2011-11-17 05:29:19
Also in:
lkml
On Wed, Nov 16, 2011 at 03:48:11PM +0100, Thomas Gleixner wrote:
On Wed, 16 Nov 2011, Steven Rostedt wrote:quoted
Thomas, doesn't printk not print to serial in atomic contexts? Or did
I guess you mean console_trylock_for_printk() will fail in atomic context? If so, yeah, that doesn't change. But the issue is console_cpu_notify() call console_lock() directly. That means below scenario could also happen in mainline: CPU A CPU B doing printk with console_sem held take_cpu_down(); cpu_notify(CPU_DYING); console_cpu_notify(); console_lock(); down(&console_sem); *bang* up(&console_sem); Sounds I should also send this patch to mainline. Thanks, Yong