diff options
author | Mike Kravetz <[email protected]> | 2022-11-18 11:52:49 -0800 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-11-22 18:50:44 -0800 |
commit | 7fb0728a9b005b8fc55e835529047cca15191031 (patch) | |
tree | c39483e917b55a294de9ee4a57fbea4ea419b8a9 /lib/mpi/mpi-mod.c | |
parent | 747c0f35f2d55de20093e992bd9fc7292193c0e6 (diff) |
hugetlb: fix __prep_compound_gigantic_page page flag setting
Commit 2b21624fc232 ("hugetlb: freeze allocated pages before creating
hugetlb pages") changed the order page flags were cleared and set in the
head page. It moved the __ClearPageReserved after __SetPageHead.
However, there is a check to make sure __ClearPageReserved is never done
on a head page. If CONFIG_DEBUG_VM_PGFLAGS is enabled, the following BUG
will be hit when creating a hugetlb gigantic page:
page dumped because: VM_BUG_ON_PAGE(1 && PageCompound(page))
------------[ cut here ]------------
kernel BUG at include/linux/page-flags.h:500!
Call Trace will differ depending on whether hugetlb page is created
at boot time or run time.
Make sure to __ClearPageReserved BEFORE __SetPageHead.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 2b21624fc232 ("hugetlb: freeze allocated pages before creating hugetlb pages")
Signed-off-by: Mike Kravetz <[email protected]>
Reported-by: Aneesh Kumar K.V <[email protected]>
Acked-by: Muchun Song <[email protected]>
Tested-by: Tarun Sahu <[email protected]>
Reviewed-by: Miaohe Lin <[email protected]>
Cc: Joao Martins <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Sidhartha Kumar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions