]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/boot: Validate console=uart8250 baud rate to fix early boot hang
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 13 Jul 2026 19:49:25 +0000 (21:49 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 14 Jul 2026 09:01:33 +0000 (11:01 +0200)
commitffa0aa5b625fe0bed7463ac613f8b06676ff4542
tree1ee823d6b6e55ca0727114f8a18f063da7f7a2e5
parentd130041a7b96f79cd4c7079a6c2431a6db4c9619
x86/boot: Validate console=uart8250 baud rate to fix early boot hang

When the baud rate is empty, 0, invalid, or overflows to 0 when stored
as an int, the system will hang during early boot because of a division
by zero in early_serial_init().

Fall back to DEFAULT_BAUD when the resulting baud rate is 0 to prevent
an early system hang.

Fixes: ce0aa5dd20e4 ("x86, setup: Make the setup code also accept console=uart8250")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260713194924.126472-3-thorsten.blum@linux.dev
arch/x86/boot/early_serial_console.c