summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/ioremap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/ioremap.c')
-rw-r--r--arch/powerpc/mm/ioremap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/mm/ioremap.c b/arch/powerpc/mm/ioremap.c
index d5159f205380..7823c38f09de 100644
--- a/arch/powerpc/mm/ioremap.c
+++ b/arch/powerpc/mm/ioremap.c
@@ -51,7 +51,8 @@ void __iomem *ioremap_prot(phys_addr_t addr, size_t size, unsigned long flags)
pte = pte_mkdirty(pte);
/* we don't want to let _PAGE_USER leak out */
- pte = pte_mkprivileged(pte);
+ if (WARN_ON(pte_user(pte)))
+ return NULL;
if (iowa_is_active())
return iowa_ioremap(addr, size, pte_pgprot(pte), caller);