android_kernel_google_msm/fs/proc
Oleg Nesterov 01fb6f509c UPSTREAM: proc: actually make proc_fd_permission() thread-friendly
(cherry pick from commit 54708d2858e79a2bdda10bf8a20c80eb96c20613)

The commit 96d0df79f2 ("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: 96d0df79f2 ("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>
Bug: 26016905
Change-Id: Id91ef67770ab09fb2023338f4d0ace5fd3a60b1f
2016-10-29 23:12:14 +08:00
..
array.c
base.c UPSTREAM: proc: actually make proc_fd_permission() thread-friendly 2016-10-29 23:12:14 +08:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
generic.c proc: Allow proc_free_inum to be called from any context 2015-07-13 11:21:13 -07:00
inode.c proc: Fix the namespace inode permission checks. 2015-07-13 11:18:00 -07:00
internal.h
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile
meminfo.c
mmu.c
namespaces.c proc: Usable inode numbers for the namespace file descriptors. 2015-07-13 11:18:01 -07:00
nommu.c
page.c
proc_devtree.c
proc_net.c
proc_sysctl.c
proc_tty.c
root.c
softirqs.c
stat.c
task_mmu.c BACKPORT: pagemap: do not leak physical addresses to non-privileged userspace 2016-01-12 17:15:28 -05:00
task_nommu.c
uptime.c
version.c
vmcore.c