lkml.org 
[lkml]   [2011]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] printk: Allocate kernel log buffer earlier

* Yinghai Lu <yinghai@kernel.org> wrote:

> + new_addr = memblock_alloc(new_log_buf_len, PAGE_SIZE);
> + if (new_addr != MEMBLOCK_ERROR)
> + new_log_buf = __va(new_addr);
> + else
> + new_log_buf = alloc_bootmem(new_log_buf_len);

alloc_bootmem() can fail, especially if someone uses a too large boot parameter
value - and your code does not check for failure.

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-02-28 09:09    [W:0.117 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site