Re: [PATCH v3] printk: Remove console options before decoding the name
From: Tony Lindgren
Date: Thu Sep 24 2026 - 03:42:35 EST
On Thu, Sep 24, 2026 at 10:00:57AM +0300, David Engraf wrote:
> This fixes a regression when a console option includes ':'. Commit
> 7640f1a44eba ("printk: Add match_devname_and_update_preferred_console()")
> introduced console=DEVNAME:0.0 hardware style addressing by looking for a
> colon. If the colon is part of an option the name is handled as devname
> instead of ttyname.
>
> Fix by handling the options first which will add a NULL terminator to the
> string and refactor idx handling to clean up the code (thanks to Petr
> Mladek).
Maybe clarify the above a bit to make it clear that the refactoring is
needed for the fix. Something like:
Fix by handling the options first which will add a NULL terminator to the
string. Note that parsing the options first means that also idx parsing
needs changing. Handle the idx parsing by refactoring the code (thanks to
Petr Mladek).
Other than that:
Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>