[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1366619113-28017-2-git-send-email-iamjoonsoo.kim@lge.com>
Date: Mon, 22 Apr 2013 17:25:13 +0900
From: Joonsoo Kim <iamjoonsoo.kim@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Yinghai Lu <yinghai@...nel.org>,
Johannes Weiner <hannes@...xchg.org>,
Jiang Liu <liuj97@...il.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: [PATCH 2/2] mm, nobootmem: do memset() after memblock_reserve()
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@....com>
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index a31be7a..bdd3fa2 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -45,9 +45,9 @@ static void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
if (!addr)
return NULL;
+ memblock_reserve(addr, size);
ptr = phys_to_virt(addr);
memset(ptr, 0, size);
- memblock_reserve(addr, size);
/*
* The min_count is set to 0 so that bootmem allocated blocks
* are never reported as leaks.
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists