aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk/printk.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2024-03-27 12:59:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-09 15:30:13 +0200
commit8a831c584e6e80cf68f79893dc395c16cdf47dc8 (patch)
treeef5a54ea429ad2e75e94b1f644fd4fc5d822b0ec /kernel/printk/printk.c
parentprintk: Save console options for add_preferred_console_match() (diff)
downloadlinux-stable-8a831c584e6e80cf68f79893dc395c16cdf47dc8.tar.xz
linux-stable-8a831c584e6e80cf68f79893dc395c16cdf47dc8.zip
printk: Don't try to parse DEVNAME:0.0 console options
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>
Diffstat (limited to 'kernel/printk/printk.c')
-rw-r--r--kernel/printk/printk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 05919491c5a2..67937e5c6010 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -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.
*/