Commit 79e0bc37 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Ralf Baechle

[MIPS] Fix mprotect() syscall for MIPS32 w/36-bit physical address support

    
Fix mprotect() syscall for MIPS32 CPUs with 36-bit physical address
support: pte_modify() macro didn't clear the hardware page protection bits
before modifying...
Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 9370b351
...@@ -354,6 +354,7 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot) ...@@ -354,6 +354,7 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot)
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{ {
pte.pte_low &= _PAGE_CHG_MASK; pte.pte_low &= _PAGE_CHG_MASK;
pte.pte_high &= ~0x3f;
pte.pte_low |= pgprot_val(newprot); pte.pte_low |= pgprot_val(newprot);
pte.pte_high |= pgprot_val(newprot) & 0x3f; pte.pte_high |= pgprot_val(newprot) & 0x3f;
return pte; return pte;
......
Markdown is supported
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