From ba974827db2683b8511bb49954a9f972398f24de Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Sat, 25 Mar 2006 16:20:22 +0100 Subject: [PATCH] --- yaml --- r: 23693 b: refs/heads/master c: 315ab19a6d12d6af7b6957090822f3057ab7e80f h: refs/heads/master i: 23691: a36d20531b582bb08c06998e615e25a2fa47c58f v: v3 --- [refs] | 2 +- trunk/mm/memory.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index cc5fa7740c42..f87384c8948a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f081a529f808ed450c22553de7b3275e0ffde9a0 +refs/heads/master: 315ab19a6d12d6af7b6957090822f3057ab7e80f diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index 80c3fb370f91..e347e106ca3a 100644 --- a/trunk/mm/memory.c +++ b/trunk/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