Re: [PATCH printk v3 32/40] netconsole: avoid CON_ENABLED misuse to track registration
From: Petr Mladek
Date: Thu Nov 10 2022 - 10:17:51 EST
On Mon 2022-11-07 15:22:30, John Ogness wrote:
> The CON_ENABLED flag is being misused to track whether or not the
> extended console should be or has been registered. Instead use
> a local variable to decide if the extended console should be
> registered and console_is_registered() to determine if it has
> been registered.
>
> Also add a check in cleanup_netconsole() to only unregister the
> extended console if it has been registered.
>
> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
Best Regards,
Petr