Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: 8250: Check for valid console index

Let's not allow negative numbers for console index.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231004085511.42645-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Tony Lindgren and committed by
Greg Kroah-Hartman
b9cbe7e8 0d447e92

+1 -1
+1 -1
drivers/tty/serial/8250/8250_core.c
··· 611 611 * if so, search for the first available port that does have 612 612 * console support. 613 613 */ 614 - if (co->index >= UART_NR) 614 + if (co->index < 0 || co->index >= UART_NR) 615 615 co->index = 0; 616 616 617 617 /*