]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/proc/task_nommu.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[mirror_ubuntu-bionic-kernel.git] / fs / proc / task_nommu.c
index 12c20377772d86f33111d7ea2797c9b077dcc979..8f5c05d3dbd3e2aaa4abcd3fcc92af79e324daca 100644 (file)
@@ -135,7 +135,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
                struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
                dev = inode->i_sb->s_dev;
                ino = inode->i_ino;
-               pgoff = (loff_t)vma->pg_off << PAGE_SHIFT;
+               pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
        }
 
        seq_printf(m,
@@ -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))