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

From: Petr Mladek
Date: Fri May 17 2024 - 11:00:19 EST


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@xxxxxxxxxxxxx>

Sounds good:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr