aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/devices.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2015-11-06 16:30:06 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 17:50:42 -0800
commit54708d2858e79a2bdda10bf8a20c80eb96c20613 (patch)
tree4228afc090f3a84482ec6a039b06e3769c0ee1a1 /fs/proc/devices.c
parentfs/proc/array.c: set overflow flag in case of error (diff)
downloadlinux-dev-54708d2858e79a2bdda10bf8a20c80eb96c20613.tar.xz
linux-dev-54708d2858e79a2bdda10bf8a20c80eb96c20613.zip
proc: actually make proc_fd_permission() thread-friendly
The commit 96d0df79f264 ("proc: make proc_fd_permission() thread-friendly") fixed the access to /proc/self/fd from sub-threads, but introduced another problem: a sub-thread can't access /proc/<tid>/fd/ or /proc/thread-self/fd if generic_permission() fails. Change proc_fd_permission() to check same_thread_group(pid_task(), current). Fixes: 96d0df79f264 ("proc: make proc_fd_permission() thread-friendly") Reported-by: "Jin, Yihua" <yihua.jin@intel.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/devices.c')
0 files changed, 0 insertions, 0 deletions