Re: possible deadlock in console_unlock

From: Sergey Senozhatsky
Date: Tue Jun 19 2018 - 04:08:27 EST


On (06/19/18 10:04), Petr Mladek wrote:
> > >
> > > We could allow nesting. It is just a matter of how many bits we
> > > reserve for it in printk_context variable.
> > [..]
> > > In each case, I would like to keep the printk_safe context usage
> > > at minimum. It has its own problems caused by limited per-cpu buffers
> > > and the need to flush them.
> >
> > May be. Every new printk_safe flavour comes with increasing memory
> > usage.
>
> This must be a misunderstanding. My intention was to introduce
> printk_deferred() context. Where any printk() called in this
> context would behave like printk_deferred(). It does not need
> any extra buffers.

Ah, got it. Yes, this can work.

-ss