Add test case 'hugepage_overcommit'

After a successful hugetlb page migration by soft offline, the source
page will either be freed into hugepage_freelists or buddy
(over-commit page). If page is in buddy, page_hstate(page) will be
NULL. It will hit a NULL pointer dereference in

[  890.677918] BUG: unable to handle kernel NULL pointer dereference at 0000000000000058
[  890.685741] IP: [<ffffffff81163761>] dequeue_hwpoisoned_huge_page+0x131/0x1d0
[  890.692861] PGD c23762067 PUD c24be2067 PMD 0
[  890.697314] Oops: 0000 [#1] SMP

This test case is targeted for the bug reported by Jianguo Wu,
where we have NULL pointer access when we have to free source
hugepage under overcommitting situation.

Signed-off-by: Naoya Horiguchi <>
Signed-off-by: Chen, Gong <>
4 files changed