Re: [PATCH v2] printk: defer_console_output: use atomic update

From: Sergey Senozhatsky
Date: Mon Feb 14 2022 - 00:36:05 EST


On (22/02/14 14:32), Sergey Senozhatsky wrote:
> On (22/02/11 12:28), John Ogness wrote:
> > Hi Petr,
> >
> > On 2022-02-10, Petr Mladek <pmladek@xxxxxxxx> wrote:
> > > The patch has been committed into printk/linux.git, branch for-5.18.
> >
> > Sebastian also pointed out that the use of __this_cpu_xchg() is the same
> > problem with the same variable for the same reason. We should fold that
> > change into the patch as well. The patch will followup this message.
>
> But that __this_cpu_xchg() (that this lol) can only be performed form the
> IRQ context. Can you please elaborate what is the problem with it?

Oh, it can race with NMI, yeah.