aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/memory.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 80c3fb370f91..e347e106ca3a 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_
395 return NULL; 395 return NULL;
396 } 396 }
397 397
398#ifdef CONFIG_DEBUG_VM 398 /*
399 * Add some anal sanity checks for now. Eventually,
400 * we should just do "return pfn_to_page(pfn)", but
401 * in the meantime we check that we get a valid pfn,
402 * and that the resulting page looks ok.
403 */
399 if (unlikely(!pfn_valid(pfn))) { 404 if (unlikely(!pfn_valid(pfn))) {
400 print_bad_pte(vma, pte, addr); 405 print_bad_pte(vma, pte, addr);
401 return NULL; 406 return NULL;
402 } 407 }
403#endif
404 408
405 /* 409 /*
406 * NOTE! We still have PageReserved() pages in the page 410 * NOTE! We still have PageReserved() pages in the page