X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fproc%2Ftask_nommu.c;h=d8b8c7183c243d86455390f1246da6c12891d396;hb=14f7d720bb6cc60be8931ea1a0f547dc1e475b88;hp=7cddf6b8635aa612362042e4b3609a270a61555c;hpb=5a84d159061d914c8dd4aa372ac6e9529c2be453;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); }