[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o8but4jy.fsf@jogness.linutronix.de>
Date: Fri, 25 Jun 2021 16:20:09 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH printk v3 6/6] printk: syslog: close window between wait and read
On 2021-06-25, Steven Rostedt <rostedt@...dmis.org> wrote:
>> + * @syslog_lock is held when entering the read loop to prevent
>> + * another reader from modifying @syslog_seq.
>
> You should add to the above comment:
>
> * And the @syslog_lock is released before exiting the loop.
>
> Because it's not normal to enter a loop locked, and have it unlocked
> when exiting the loop. And I can envision in the future, someone might
> add a break (for error) while still holding the lock.
Agreed. Thanks.
John
Powered by blists - more mailing lists