Re: [PATCH v3] printk: Remove console options before decoding the name

From: David Engraf

Date: Mon Sep 28 2026 - 02:18:39 EST


On 24.09.26 10:42 wrote Tony Lindgren:
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>

Sure I can update the description. Should I create a v4 with the updated description and your review tag or how to proceed?

Best regards
- David