Commit e3a920af authored by Will Deacon's avatar Will Deacon Committed by Catalin Marinas
Browse files

arm64: mm: remove broken &= operator from pmd_mknotpresent

This should be a plain old '&' and could easily lead to undefined
behaviour if the target of a pmd_mknotpresent invocation was the same
as the parameter.

Fixes: 9c7e535f

 (arm64: mm: Route pmd thp functions through pte equivalents)
Signed-off-by: default avatarWill Deacon <>
Cc: <> # v3.15
Signed-off-by: default avatarCatalin Marinas <>
parent 5e406450
......@@ -246,7 +246,7 @@ static inline pmd_t pte_pmd(pte_t pte)
#define pmd_mkwrite(pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd)))
#define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd)))
#define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd)))
#define pmd_mknotpresent(pmd) (__pmd(pmd_val(pmd) &= ~PMD_TYPE_MASK))
#define pmd_mknotpresent(pmd) (__pmd(pmd_val(pmd) & ~PMD_TYPE_MASK))
#define pmd_write(pmd) pte_write(pmd_pte(pmd))
Supports Markdown
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