diff options
author | John Ogness <john.ogness@linutronix.de> | 2024-08-20 08:35:38 +0206 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2024-08-21 14:56:23 +0200 |
commit | dc219d8d858d95549543aa7a41b6e64a0da9e406 (patch) | |
tree | 25683bbd0533abc6d7a2e21895dc292b25795401 /kernel/printk | |
parent | eabd4600dafacf9895184259373f2445ff748654 (diff) |
console: Improve console_srcu_read_flags() comments
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>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240820063001.36405-13-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/printk')
0 files changed, 0 insertions, 0 deletions