Re: [PATCH printk v3 6/6] printk: syslog: close window between wait and read

From: John Ogness
Date: Mon Jun 28 2021 - 11:25:23 EST


On 2021-06-28, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> Petr Mladek <pmladek@xxxxxxxx> wrote:
>> I was double checking the code and the locking is really hard to
>> follow. I would if the following approach make it easier. The main
>> trick is that the lock is taken at the beginnig and release at
>> the end. It is only temporary released around a single line
>> when needed.
>
> That's a much more common approach to locking, that may not be as
> efficient, but is much easier to keep straight, and less error prone.

OK. I will use this approach for v4. Thank you.

John