mm_for_maps: shift down_read(mmap_sem) to the caller
[safe/jmp/linux-2.6] / fs / proc / task_nommu.c
index 64a72e2..8f5c05d 100644 (file)
@@ -189,6 +189,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
                priv->task = NULL;
                return NULL;
        }
+       down_read(&mm->mmap_sem);
 
        /* start from the Nth VMA */
        for (p = rb_first(&mm->mm_rb); p; p = rb_next(p))