X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fproc%2Ftask_nommu.c;h=d8b8c7183c243d86455390f1246da6c12891d396;hb=d7f5e3df3574c6e38b99f5fe22f15540b2b9811d;hp=fcc5caf93f554594aa3a9873abef5c22b67abfa6;hpb=13d7d84e078f49f08b657a3fba0d7a0b7b44ba65;p=linux-2.6-omap-h63xx.git diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index fcc5caf93f5..d8b8c7183c2 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); } @@ -220,7 +227,7 @@ static int maps_open(struct inode *inode, struct file *file) return ret; } -struct file_operations proc_maps_operations = { +const struct file_operations proc_maps_operations = { .open = maps_open, .read = seq_read, .llseek = seq_lseek,