Skip to content

Commit

Permalink
printk: Don't try to parse DEVNAME:0.0 console options
Browse files Browse the repository at this point in the history
Currently console_setup() tries to make a console index out of any digits
passed in the kernel command line for console. In the DEVNAME:0.0 case,
the name can contain a device IO address, so bail out on console names
with a ':'.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20240327110021.59793-3-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tony Lindgren authored and Greg Kroah-Hartman committed Apr 9, 2024
1 parent f03e8c1 commit 8a831c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2504,6 +2504,10 @@ static int __init console_setup(char *str)
if (console_opt_save(str, brl_options))
return 1;

/* Don't attempt to parse a DEVNAME:0.0 style console */
if (strchr(str, ':'))
return 1;

/*
* Decode str into name, index, options.
*/
Expand Down

0 comments on commit 8a831c5

Please sign in to comment.