[ARM] 3853/1: Fix flush_ptrace_access() thinko for nonaliasing VIPT cache case
authorGeorge G. Davis <davis_g@mvista.com>
Thu, 21 Sep 2006 02:57:04 +0000 (03:57 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 25 Sep 2006 09:34:04 +0000 (10:34 +0100)
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: George G. Davis <gdavis@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/flush.c

index 1efb05c64db3554b83e3c1dc8e6f8f2df865a6e1..454205b789d5a06f52965978a156681cfe34de69 100644 (file)
@@ -107,7 +107,7 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
 
        /* VIPT non-aliasing cache */
        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;
                /* only flushing the kernel mapping on non-aliasing VIPT */
                __cpuc_coherent_kern_range(addr, addr + len);