Skip to content
Commit 48021f98 authored by Shreyas Joshi's avatar Shreyas Joshi Committed by Petr Mladek
Browse files

printk: handle blank console arguments passed in.



If uboot passes a blank string to console_setup then it results in
a trashed memory. Ultimately, the kernel crashes during freeing up
the memory.

This fix checks if there is a blank parameter being
passed to console_setup from uboot. In case it detects that
the console parameter is blank then it doesn't setup the serial
device and it gracefully exits.

Link: https://lore.kernel.org/r/20200522065306.83-1-shreyas.joshi@biamp.com
Signed-off-by: default avatarShreyas Joshi <shreyas.joshi@biamp.com>
Acked-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
[pmladek@suse.com: Better format the commit message and code, remove unnecessary brackets.]
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
parent 8ece3b3e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment