Re: [PATCH printk v5 10/30] console: Improve console_srcu_read_flags() comments

Petr Mladek
2024-05-17T14:55:28Z

On Thu 2024-05-02 23:44:19, John Ogness wrote:
> It was not clear when exactly console_srcu_read_flags() must be
> used vs. directly reading @console->flags.
>
> Refactor and clarify that console_srcu_read_flags() is only
> needed if the console is registered or the caller is in a
> context where the registration status of the console may change
> (due to another context).
>
> The function requires the caller holds @console_srcu, which will
> ensure that the caller sees an appropriate @flags value for the
> registered console and that exit/cleanup routines will not run
> if the console is in the process of unregistration.
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>

Sounds good:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr