Re: [External] Re: [PATCH v2] printk: fix deadlock when kernel panic

From: Sergey Senozhatsky
Date: Tue Feb 09 2021 - 21:35:38 EST


On (21/02/09 09:39), Petr Mladek wrote:
> > > So then this never re-inits the safe_read_lock?
>
> Yes, but it will also not cause the deadlock.

Right.

> I prefer this approach. It is straightforward because it handles
> read_lock the same way as logbuf_lock.

I'm fine with that approach, but this needs to be in the commit message.
Something like "lose printk_safe message when we think we will deadlock
on printk_safe flush".

-ss