lkml.org 
[lkml]   [2021]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH printk v3 6/6] printk: syslog: close window between wait and read
Date
On 2021-06-25, Steven Rostedt <rostedt@goodmis.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

\
 
 \ /
  Last update: 2021-06-25 16:15    [W:0.752 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site