diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 79c22707a6375c84cbda0f89df31abf0eda28836..4cd2ff546ef6f9d322b2f882ca182bf5315cf7c9 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -61,8 +61,10 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, #endif *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT)); - *pte = pte_mkexec(*pte); - *pte = pte_wrprotect(*pte); + /* This is wrong for the code page, but it doesn't matter since the + * stub is mapped by hand with the correct permissions. + */ + *pte = pte_mkwrite(*pte); return(0); out_pmd: diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index 4862daf8b9068390c31e247d7fc2ed34dce7f9e7..188f726217766f8e45bc7dce5a130e509d9b2f68 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h @@ -274,12 +274,6 @@ static inline pte_t pte_mkread(pte_t pte) return(pte_mknewprot(pte)); } -static inline pte_t pte_mkexec(pte_t pte) -{ - pte_set_bits(pte, _PAGE_USER); - return(pte_mknewprot(pte)); -} - static inline pte_t pte_mkdirty(pte_t pte) { pte_set_bits(pte, _PAGE_DIRTY);