lkml.org 
[lkml]   [2008]   [Mar]   [26]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
Patch in this message
/
DateWed, 26 Mar 2008 04:51:43 -0700 (PDT)
SubjectRe: sparc64 BUG: using smp_processor_id() in preemptible
FromDavid Miller <>
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Date: Wed, 26 Mar 2008 12:46:53 +0100

> Ok it worked. Now I get a bunch of these:
> 
> BUG: using smp_processor_id() in preemptible [00000000] code: pidof/2471
> caller is flush_ptrace_access+0xc0/0x1a0

Here ya go:

commit f6a843d939ade435e060d580f5c56d958464f8a5
Author: David S. Miller <davem@davemloft.net>
Date:   Wed Mar 26 04:51:12 2008 -0700

    [SPARC64]: flush_ptrace_access() needs preemption disable.

    Based upon a report by Mariusz Kozlowski.

    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index bcf58ec..aaae865 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -70,6 +70,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
@@ -108,6 +110,8 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
 		for (; start < end; start += icache_line_size)
 			flushi(start);
 	}
+
+	preempt_enable();
 }
 
 enum sparc_regset {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2008-03-26 11:55    [W:0.111 / U:0.290 seconds]
©2003-2008 Jasper Spaans