X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fproc%2Ftask_nommu.c;h=d8b8c7183c243d86455390f1246da6c12891d396;hb=0a4908e19fd016d60403fc76cf38b2d08d21e2d2;hp=7cddf6b8635aa612362042e4b3609a270a61555c;hpb=6f8c480f998a619082f18407f8d7f4c29e94dc6e;p=linux-2.6 diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 7cddf6b863..d8b8c7183c 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "internal.h" @@ -143,6 +144,12 @@ out: static int show_map(struct seq_file *m, void *_vml) { struct vm_list_struct *vml = _vml; + struct proc_maps_private *priv = m->private; + struct task_struct *task = priv->task; + + if (maps_protect && !ptrace_may_attach(task)) + return -EACCES; + return nommu_vma_show(m, vml->vma); }