projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bddc813
)
[MIPS] sparsemem: fix crash in show_mem
author
Atsushi Nemoto
<anemo@mba.ocn.ne.jp>
Thu, 13 Jul 2006 14:01:50 +0000
(23:01 +0900)
committer
Ralf Baechle
<ralf@linux-mips.org>
Thu, 13 Jul 2006 20:26:22 +0000
(21:26 +0100)
With sparsemem, pfn should be checked by pfn_valid() before pfn_to_page().
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/pgtable.c
patch
|
blob
|
history
diff --git
a/arch/mips/mm/pgtable.c
b/arch/mips/mm/pgtable.c
index 792c6eb442326790b72759d7ca5e8cd433f838af..c93aa6cbcaca5ece41421a2a2661adb5b7e3e669 100644
(file)
--- a/
arch/mips/mm/pgtable.c
+++ b/
arch/mips/mm/pgtable.c
@@
-15,6
+15,8
@@
void show_mem(void)
printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
pfn = max_mapnr;
while (pfn-- > 0) {
+ if (!pfn_valid(pfn))
+ continue;
page = pfn_to_page(pfn);
total++;
if (PageHighMem(page))