提交 3a21138d 编写于 作者: C Colin Cross 提交者: Greg Kroah-Hartman

staging: android: ram_console: fix crash in ram_console_late_init

If the persistent ram buffer is not available, ram_console_late_init
would crash when dereferencing ram_console_zone.  Return early if
ram console was not initialized.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: NColin Cross <ccross@android.com>
Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a15d0b36
无相关合并请求
......@@ -150,6 +150,9 @@ static int __init ram_console_late_init(void)
struct proc_dir_entry *entry;
struct persistent_ram_zone *prz = ram_console_zone;
if (!prz)
return 0;
if (persistent_ram_old_size(prz) == 0)
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部