Messages in this thread | | | From | John Ogness <> | Subject | Re: [PATCH 2/4] printk: disable optimistic spin during panic | Date | Thu, 27 Jan 2022 10:15:05 +0106 |
| |
On 2022-01-27, Sergey Senozhatsky <senozhatsky@chromium.org> wrote: > Right. So I also thought about placing panic_in_progress() somewhere in > console_trylock() and make it fail for anything that is not a panic > CPU.
I think this is a good idea and console_trylock() is the correct place for that.
> Back in the days we also had this idea of "detaching" non-panic CPUs from > printk() by overwriting their printk function pointers.
We need to keep in mind that printk() is no longer the problem. The records are stored locklessly. The problem is the console_trylock()/console_unlock() within vprintk_emit(). IMHO adding a panic check in console_trylock() should solve that race sufficiently.
John
| |