diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-05-23 13:04:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-24 09:56:12 -0700 |
commit | cd94b9dbfa300fc42e45f230010623fc08d59563 (patch) | |
tree | ad9581e94a635032d74d3905975ebd4c39bed5f2 /drivers/video/sm501fb.c | |
parent | 7eb54824b76793dd86afb54f182ef9aa64b3a45a (diff) | |
download | op-kernel-dev-cd94b9dbfa300fc42e45f230010623fc08d59563.zip op-kernel-dev-cd94b9dbfa300fc42e45f230010623fc08d59563.tar.gz |
memory hotplug: fix early allocation handling
Trying to add memory via add_memory() from within an initcall function
results in
bootmem alloc of 163840 bytes failed!
Kernel panic - not syncing: Out of memory
This is caused by zone_wait_table_init() which uses system_state to decide
if it should use the bootmem allocator or not.
When initcalls are handled the system_state is still SYSTEM_BOOTING but
the bootmem allocator doesn't work anymore. So the allocation will fail.
To fix this use slab_is_available() instead as indicator like we do it
everywhere else.
[akpm@linux-foundation.org: coding-style fix]
Reviewed-by: Andy Whitcroft <apw@shadowen.org>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/sm501fb.c')
0 files changed, 0 insertions, 0 deletions