hugetlb: clear PG_reserved before setting PG_head on gigantic pages
Hillf Danton
Acked-byQuoted 10 lines
PF_NO_COMPOUNDforPG_reservedassumes we don't usePG_reservedfor compound pages. And we generally don't. But during allocation of gigantic pages we setPG_headbefore clearingPG_reservedand__ClearPageReserved()steps on theVM_BUG_ON_PAGE().The fix is trivial: set
PG_headafterPG_reserved.Signed-off-by Kirill A. Shutemov <[email protected]>Reported-by Sasha Levin <[email protected]>---
Acked-by Hillf Danton <[email protected]>
Quoted 22 lines
Andrew, this patch can be folded into "page-flags: define
PG_reservedbehavior on compound pages".--- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/hugetlb.c +1
-2@@ -1258,8 +1258,8 @@ static void prep_compound_gigantic_page(struct page *page, unsigned int order)/* we rely on prep_new_huge_page to set the destructor */ set_compound_order (page, order); -__SetPageHead (page);__ClearPageReserved (page); +__SetPageHead (page);for (i =1 ; i < nr_pages; i++, p =mem_map_next (p, page, i)) {/* * For gigantic hugepages allocated through bootmem at --
Quoted 2 lines
2.5.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>