projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4def35
)
mm, nobootmem: do memset() after memblock_reserve()
author
Joonsoo Kim
<
[email protected]
>
Mon, 29 Apr 2013 22:08:53 +0000
(15:08 -0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 29 Apr 2013 22:54:39 +0000
(15:54 -0700)
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 <
[email protected]
>
Cc: Yinghai Lu <
[email protected]
>
Acked-by: Johannes Weiner <
[email protected]
>
Cc: Jiang Liu <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/nobootmem.c
patch
|
blob
|
history
diff --git
a/mm/nobootmem.c
b/mm/nobootmem.c
index a31be7a0493beeb8f8cc88190e27774b08b962a9..bdd3fa2fc73b8395fa78979874eb46c2e3ab20c5 100644
(file)
--- 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.