aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorPo-Yu Chuang <ratbert@faraday-tech.com>2011-06-09 03:42:17 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-06-09 05:15:07 -0400
commit373ce3020b03fb6199415ab866595c7d627bbc97 (patch)
tree20c2bc022c8eb35f418ee8e44a7801cf39ad09c4 /arch/arm/kernel
parent720c60e1943a06cfd9472ad5a9967dec304e4394 (diff)
ARM: 6955/1: cmpxchg syscall should data abort if page not write
If the page to cmpxchg is user mode read only (not write), we should simulate a data abort first. Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index d52eec268b47..c5ead3c2c618 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -563,7 +563,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
563 if (!pmd_present(*pmd)) 563 if (!pmd_present(*pmd))
564 goto bad_access; 564 goto bad_access;
565 pte = pte_offset_map_lock(mm, pmd, addr, &ptl); 565 pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
566 if (!pte_present(*pte) || !pte_dirty(*pte)) { 566 if (!pte_present(*pte) || !pte_write(*pte) || !pte_dirty(*pte)) {
567 pte_unmap_unlock(pte, ptl); 567 pte_unmap_unlock(pte, ptl);
568 goto bad_access; 568 goto bad_access;
569 } 569 }