Skip to content
Commit 634391ac authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

mm: mask bits from pmd in pmd_lockptr/pmd_huge_pte



The pmd pointer passed to pmd_lockptr/pmd_huge_pte can point to any
entry in a pmd table. With USE_SPLIT_PMD_PTLOCKS==1 the code uses
virt_to_page to get a struct page for the pmd table. The virt_to_page
function automatically masks the lower PAGE_SHIFT bits from the
address. But if the size of a pmd table is larger than PAGE_SIZE the
additional bits are not removed from the pmd address and the wrong
page struct is used.

Fix this by explicitely masking the offset in the pmd table from
the pmd pointer.

Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent db85eaeb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment