mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mm/THP: use pmd_populate() to update the pmd with pgtable_t pointer
We should not use set_pmd_at to update pmd_t with pgtable_t pointer. set_pmd_at is used to set pmd with huge pte entries and architectures like ppc64, clear few flags from the pte when saving a new entry. Without this change we observe bad pte errors like below on ppc64 with THP enabled. BUG: Bad page map in process ld mm=0xc000001ee39f4780 pte:7fc3f37848000001 pmd:c000001ec0000000 Signed-off-by: Aneesh Kumar K.V <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Reviewed-by: Andrea Arcangeli <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7450231fb3
commit
7c3425123d
1 changed files with 6 additions and 1 deletions
|
|
@ -2325,7 +2325,12 @@ static void collapse_huge_page(struct mm_struct *mm,
|
|||
pte_unmap(pte);
|
||||
spin_lock(&mm->page_table_lock);
|
||||
BUG_ON(!pmd_none(*pmd));
|
||||
set_pmd_at(mm, address, pmd, _pmd);
|
||||
/*
|
||||
* We can only use set_pmd_at when establishing
|
||||
* hugepmds and never for establishing regular pmds that
|
||||
* points to regular pagetables. Use pmd_populate for that
|
||||
*/
|
||||
pmd_populate(mm, pmd, pmd_pgtable(_pmd));
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
anon_vma_unlock_write(vma->anon_vma);
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue