[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: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by Sergei Shtylyov and committed by Ralf Baechle 79e0bc37 9370b351

+3 -2
+3 -2
include/asm-mips/pgtable.h
··· 353 353 #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) 354 354 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 355 355 { 356 - pte.pte_low &= _PAGE_CHG_MASK; 357 - pte.pte_low |= pgprot_val(newprot); 356 + pte.pte_low &= _PAGE_CHG_MASK; 357 + pte.pte_high &= ~0x3f; 358 + pte.pte_low |= pgprot_val(newprot); 358 359 pte.pte_high |= pgprot_val(newprot) & 0x3f; 359 360 return pte; 360 361 }