SPARC64: flush_ptrace_access() needs preemption disable.
authorDavid S. Miller <davem@davemloft.net>
Mon, 7 Apr 2008 07:26:11 +0000 (00:26 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:27 +0000 (18:53 -0700)
Upstream commit: f6a843d939ade435e060d580f5c56d958464f8a5

Based upon a report by Mariusz Kozlowski.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
arch/sparc64/kernel/ptrace.c

index 81111a12f0a83bffe186c418048734f9a3493683..d4af13166ef80621252d13b249b6d02da1cb2096 100644 (file)
@@ -127,6 +127,8 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
        if (tlb_type == hypervisor)
                return;
 
+       preempt_disable();
+
 #ifdef DCACHE_ALIASING_POSSIBLE
        /* If bit 13 of the kernel address we used to access the
         * user page is the same as the virtual address that page
@@ -165,6 +167,8 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
                for (; start < end; start += icache_line_size)
                        flushi(start);
        }
+
+       preempt_enable();
 }
 
 asmlinkage void do_ptrace(struct pt_regs *regs)