diff options
author | Dave Hansen <dave.hansen@linux.intel.com> | 2014-01-21 15:48:48 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 16:19:43 -0800 |
commit | 0e147aed4c250766e657855db55a395d2c8008a5 (patch) | |
tree | 97f9e808e2bb6b8d5ef011ddfd70812c148f2df9 | |
parent | f92f455f67fef27929e6043499414605b0c94872 (diff) | |
download | op-kernel-dev-0e147aed4c250766e657855db55a395d2c8008a5.zip op-kernel-dev-0e147aed4c250766e657855db55a395d2c8008a5.tar.gz |
mm: hugetlbfs: Add some VM_BUG_ON()s to catch non-hugetlbfs pages
Dave Jiang reported that he was seeing oopses when running NUMA systems
and default_hugepagesz=1G. I traced the issue down to
migrate_page_copy() trying to use the same code for hugetlb pages and
transparent hugepages. It should not have been trying to pass thp pages
in there.
So, add some VM_BUG_ON()s for the next hapless VM developer that tries
the same thing.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Tested-by: Dave Jiang <dave.jiang@intel.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/hugetlb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index bd7e987..251233c 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -360,6 +360,7 @@ static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, static inline struct hstate *page_hstate(struct page *page) { + VM_BUG_ON(!PageHuge(page)); return size_to_hstate(PAGE_SIZE << compound_order(page)); } |