aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/task_nommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/task_nommu.c')
-rw-r--r--fs/proc/task_nommu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 7cddf6b8635a..d8b8c7183c24 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -2,6 +2,7 @@
2#include <linux/mm.h> 2#include <linux/mm.h>
3#include <linux/file.h> 3#include <linux/file.h>
4#include <linux/mount.h> 4#include <linux/mount.h>
5#include <linux/ptrace.h>
5#include <linux/seq_file.h> 6#include <linux/seq_file.h>
6#include "internal.h" 7#include "internal.h"
7 8
@@ -143,6 +144,12 @@ out:
143static int show_map(struct seq_file *m, void *_vml) 144static int show_map(struct seq_file *m, void *_vml)
144{ 145{
145 struct vm_list_struct *vml = _vml; 146 struct vm_list_struct *vml = _vml;
147 struct proc_maps_private *priv = m->private;
148 struct task_struct *task = priv->task;
149
150 if (maps_protect && !ptrace_may_attach(task))
151 return -EACCES;
152
146 return nommu_vma_show(m, vml->vma); 153 return nommu_vma_show(m, vml->vma);
147} 154}
148 155