diff options
author | Philipp Hachtmann <phacht@linux.vnet.ibm.com> | 2014-01-24 00:53:10 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-24 01:36:51 +0100 |
commit | 87379ec8c2b8ae0acd526b87d2240afca92a7505 (patch) | |
tree | cd211d723a92cb4a8d7375e204d771665b60c11b /mm/mempolicy.c | |
parent | memcg: rework memcg_update_kmem_limit synchronization (diff) | |
download | linux-87379ec8c2b8ae0acd526b87d2240afca92a7505.tar.xz linux-87379ec8c2b8ae0acd526b87d2240afca92a7505.zip |
mm/nobootmem.c: add return value check in __alloc_memory_core_early()
When memblock_reserve() fails because memblock.reserved.regions cannot
be resized, the caller (e.g. alloc_bootmem()) is not informed of the
failed allocation. Therefore alloc_bootmem() silently returns the same
pointer again and again.
This patch adds a check for the return value of memblock_reserve() in
__alloc_memory_core().
Signed-off-by: Philipp Hachtmann <phacht@linux.vnet.ibm.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mempolicy.c')
0 files changed, 0 insertions, 0 deletions