lkml.org 
[lkml]   [2023]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: Check valid console index for preferred console
* Tony Lindgren <tony@atomide.com> [700101 02:00]:
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2410,6 +2410,10 @@ static int __add_preferred_console(char *name, int idx, char *options,
> struct console_cmdline *c;
> int i;
>
> + /* See struct console */
> + if (idx > SHRT_MAX)
> + return -EINVAL;
> +

We can just use const short idx for preferred console and return an error
for negative values for preferred console. I'll send out v2 patch.

Regards,

Tony

\
 
 \ /
  Last update: 2023-10-11 09:34    [W:0.037 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site