aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2006-03-25 16:20:22 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:43:45 -0800
commit315ab19a6d12d6af7b6957090822f3057ab7e80f (patch)
tree7d6d51cfbd0f5e3182d4490c077e1d3139eeb9a7 /mm
parentf081a529f808ed450c22553de7b3275e0ffde9a0 (diff)
downloadkernel_samsung_crespo-315ab19a6d12d6af7b6957090822f3057ab7e80f.zip
kernel_samsung_crespo-315ab19a6d12d6af7b6957090822f3057ab7e80f.tar.gz
kernel_samsung_crespo-315ab19a6d12d6af7b6957090822f3057ab7e80f.tar.bz2
[PATCH] mm: restore vm_normal_page check
Hugh is rightly concerned that the CONFIG_DEBUG_VM coverage has gone too far in vm_normal_page, considering that we expect production kernels to be shipped with the option turned off, and that the code has been under some large changes recently. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 80c3fb3..e347e10 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -395,12 +395,16 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_
return NULL;
}
-#ifdef CONFIG_DEBUG_VM
+ /*
+ * Add some anal sanity checks for now. Eventually,
+ * we should just do "return pfn_to_page(pfn)", but
+ * in the meantime we check that we get a valid pfn,
+ * and that the resulting page looks ok.
+ */
if (unlikely(!pfn_valid(pfn))) {
print_bad_pte(vma, pte, addr);
return NULL;
}
-#endif
/*
* NOTE! We still have PageReserved() pages in the page