diff options
-rw-r--r-- | fs/proc/base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 3c231adf8450..9e28356a959a 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1877,8 +1877,9 @@ static struct dentry *proc_map_files_lookup(struct inode *dir, | |||
1877 | if (!vma) | 1877 | if (!vma) |
1878 | goto out_no_vma; | 1878 | goto out_no_vma; |
1879 | 1879 | ||
1880 | result = proc_map_files_instantiate(dir, dentry, task, | 1880 | if (vma->vm_file) |
1881 | (void *)(unsigned long)vma->vm_file->f_mode); | 1881 | result = proc_map_files_instantiate(dir, dentry, task, |
1882 | (void *)(unsigned long)vma->vm_file->f_mode); | ||
1882 | 1883 | ||
1883 | out_no_vma: | 1884 | out_no_vma: |
1884 | up_read(&mm->mmap_sem); | 1885 | up_read(&mm->mmap_sem); |