Title: [8148] trunk/arch/blackfin/kernel/traps.c: Task [#5545], when decode_address() walking the VMAs, other CPU may removing the VMA, so the VMA rbtree need to be locked.
- Revision
- 8148
- Author
- gyang
- Date
- 2010-01-13 01:09:34 -0500 (Wed, 13 Jan 2010)
Log Message
Task [#5545], when decode_address() walking the VMAs, other CPU may removing the VMA, so the VMA rbtree need to be locked.
Modified Paths
Diff
Modified: trunk/arch/blackfin/kernel/traps.c (8147 => 8148)
--- trunk/arch/blackfin/kernel/traps.c 2010-01-12 21:01:14 UTC (rev 8147)
+++ trunk/arch/blackfin/kernel/traps.c 2010-01-13 06:09:34 UTC (rev 8148)
@@ -138,6 +138,7 @@
if (!mm)
continue;
+ down_write(&mm->mmap_sem);
for (n = rb_first(&mm->mm_rb); n; n = rb_next(n)) {
struct vm_area_struct *vma;
@@ -183,9 +184,12 @@
if (buf[0] == '\0')
sprintf(buf, "[ %s ] dynamic memory", name);
+ up_write(&mm->mmap_sem);
goto done;
}
}
+ up_write(&mm->mmap_sem);
+
if (!in_atomic)
mmput(mm);
}
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits