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

Commit a71ebdfa authored by George G. Davis's avatar George G. Davis Committed by Russell King
Browse files

[ARM] 3853/1: Fix flush_ptrace_access() thinko for nonaliasing VIPT cache case



Fix thinko in the flush_ptrace_access() "if (expr)" for the ARM
VIPT non-aliasing cache case.  We only need to flush cache when
VM_EXEC is set in vma->vm_flags but "if (expr) always evaluates
to true on UP systems for the ARM VIPT non-aliasing cache case.

Signed-off-by: default avatarGeorge G. Davis <gdavis@mvista.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent e7cc2c59
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -107,7 +107,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,


	/* VIPT non-aliasing cache */
	/* VIPT non-aliasing cache */
	if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) &&
	if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) &&
	    vma->vm_flags | VM_EXEC) {
	    vma->vm_flags & VM_EXEC) {
		unsigned long addr = (unsigned long)kaddr;
		unsigned long addr = (unsigned long)kaddr;
		/* only flushing the kernel mapping on non-aliasing VIPT */
		/* only flushing the kernel mapping on non-aliasing VIPT */
		__cpuc_coherent_kern_range(addr, addr + len);
		__cpuc_coherent_kern_range(addr, addr + len);