Title: [8279] trunk/arch/blackfin/kernel/traps.c: Task [#5545], 1.
Revision
8279
Author
gyang
Date
2010-02-08 06:38:42 -0500 (Mon, 08 Feb 2010)

Log Message

Task [#5545], 1. restore the previous patch, 2. add mmput(), this is to fix the toolchain test fail

Modified Paths

Diff

Modified: trunk/arch/blackfin/kernel/traps.c (8278 => 8279)


--- trunk/arch/blackfin/kernel/traps.c	2010-02-08 10:40:07 UTC (rev 8278)
+++ trunk/arch/blackfin/kernel/traps.c	2010-02-08 11:38:42 UTC (rev 8279)
@@ -138,6 +138,12 @@
 		if (!mm)
 			continue;
 
+		if (!down_read_trylock(&mm->mmap_sem)) {
+			if (!in_atomic)
+				mmput(mm);
+			continue;
+		}
+
 		for (n = rb_first(&mm->mm_rb); n; n = rb_next(n)) {
 			struct vm_area_struct *vma;
 
@@ -177,6 +183,8 @@
 					sprintf(buf, "[ %s vma:0x%lx-0x%lx]",
 						name, vma->vm_start, vma->vm_end);
 
+				up_read(&mm->mmap_sem);
+
 				if (!in_atomic)
 					mmput(mm);
 
@@ -186,6 +194,7 @@
 				goto done;
 			}
 		}
+		up_read(&mm->mmap_sem);
 
 		if (!in_atomic)
 			mmput(mm);
@@ -252,7 +261,9 @@
 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
 	int j;
 #endif
+#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
 	unsigned int cpu = raw_smp_processor_id();
+#endif
 	const char *strerror = NULL;
 	int sig = 0;
 	siginfo_t info;
@@ -641,17 +652,7 @@
 	{
 		info.si_signo = sig;
 		info.si_errno = 0;
-		switch (trapnr) {
-		case VEC_CPLB_VL:
-		case VEC_MISALI_D:
-		case VEC_CPLB_M:
-		case VEC_CPLB_MHIT:
-			info.si_addr = (void __user *)cpu_pda[cpu].dcplb_fault_addr;
-			break;
-		default:
-			info.si_addr = (void __user *)fp->pc;
-			break;
-		}
+		info.si_addr = (void __user *)fp->pc;
 		force_sig_info(sig, &info, current);
 	}
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to