diff options
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index f71559784bfb..fb45615943c2 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 | ||