Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 373ce302 authored by Po-Yu Chuang's avatar Po-Yu Chuang Committed by Russell King
Browse files

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: default avatarPo-Yu Chuang <ratbert@faraday-tech.com>
Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 720c60e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -563,7 +563,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
		if (!pmd_present(*pmd))
			goto bad_access;
		pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
		if (!pte_present(*pte) || !pte_dirty(*pte)) {
		if (!pte_present(*pte) || !pte_write(*pte) || !pte_dirty(*pte)) {
			pte_unmap_unlock(pte, ptl);
			goto bad_access;
		}