Messages in this thread Patch in this message | | | From | Joonsoo Kim <> | Subject | [PATCH 3/3] mm, nobootmem: do memset() after memblock_reserve() | Date | Tue, 19 Mar 2013 14:16:01 +0900 |
| |
Currently, we do memset() before reserving the area. This may not cause any problem, but it is somewhat weird. So change execution order.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index 589c673..f11ec1c 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c @@ -46,8 +46,8 @@ static void * __init __alloc_memory_core_early(int nid, u64 size, u64 align, return NULL; ptr = phys_to_virt(addr); - memset(ptr, 0, size); memblock_reserve(addr, size); + memset(ptr, 0, size); /* * The min_count is set to 0 so that bootmem allocated blocks * are never reported as leaks. -- 1.7.9.5
| |