aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index f71559784bf..3326bbf9ab9 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -322,7 +322,10 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer)
322 wchan = get_wchan(task); 322 wchan = get_wchan(task);
323 323
324 if (lookup_symbol_name(wchan, symname) < 0) 324 if (lookup_symbol_name(wchan, symname) < 0)
325 return sprintf(buffer, "%lu", wchan); 325 if (!ptrace_may_access(task, PTRACE_MODE_READ))
326 return 0;
327 else
328 return sprintf(buffer, "%lu", wchan);
326 else 329 else
327 return sprintf(buffer, "%s", symname); 330 return sprintf(buffer, "%s", symname);
328} 331}
@@ -648,14 +651,14 @@ static unsigned mounts_poll(struct file *file, poll_table *wait)
648{ 651{
649 struct proc_mounts *p = file->private_data; 652 struct proc_mounts *p = file->private_data;
650 struct mnt_namespace *ns = p->ns; 653 struct mnt_namespace *ns = p->ns;
651 unsigned res = 0; 654 unsigned res = POLLIN | POLLRDNORM;
652 655
653 poll_wait(file, &ns->poll, wait); 656 poll_wait(file, &ns->poll, wait);
654 657
655 spin_lock(&vfsmount_lock); 658 spin_lock(&vfsmount_lock);
656 if (p->event != ns->event) { 659 if (p->event != ns->event) {
657 p->event = ns->event; 660 p->event = ns->event;
658 res = POLLERR; 661 res |= POLLERR | POLLPRI;
659 } 662 }
660 spin_unlock(&vfsmount_lock); 663 spin_unlock(&vfsmount_lock);
661 664
@@ -1953,7 +1956,7 @@ static struct dentry *proc_pident_instantiate(struct inode *dir,
1953 const struct pid_entry *p = ptr; 1956 const struct pid_entry *p = ptr;
1954 struct inode *inode; 1957 struct inode *inode;
1955 struct proc_inode *ei; 1958 struct proc_inode *ei;
1956 struct dentry *error = ERR_PTR(-EINVAL); 1959 struct dentry *error = ERR_PTR(-ENOENT);
1957 1960
1958 inode = proc_pid_make_inode(dir->i_sb, task); 1961 inode = proc_pid_make_inode(dir->i_sb, task);
1959 if (!inode) 1962 if (!inode)