android_kernel_xiaomi_sm8350/fs/proc
Eric W. Biederman 19fd4bb2a0 proc: remove races from proc_id_readdir()
Oleg noticed that the call of task_pid_nr_ns() in proc_pid_readdir
is racy with respect to tasks exiting.

After a bit of examination it also appears that the call itself
is completely unnecessary.

So to fix the problem this patch modifies next_tgid() to return
both a tgid and the task struct in question.

A structure is introduced to return these values because it is
slightly cleaner and easier to optimize, and the resulting code
is a little shorter.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29 09:24:52 -08:00
..
array.c sched: fix prev_stime calculation 2007-11-26 21:21:49 +01:00
base.c proc: remove races from proc_id_readdir() 2007-11-29 09:24:52 -08:00
generic.c proc: fix NULL ->i_fop oops 2007-11-29 09:24:52 -08:00
inode-alloc.txt
inode.c pid namespaces: make proc have multiple superblocks - one for each namespace 2007-10-19 11:53:39 -07:00
internal.h proc: fix NULL ->i_fop oops 2007-11-29 09:24:52 -08:00
kcore.c
kmsg.c
Makefile
mmu.c
nommu.c
proc_devtree.c
proc_misc.c pid namespaces: define and use task_active_pid_ns() wrapper 2007-10-19 11:53:37 -07:00
proc_net.c [NET]: Move unneeded data to initdata section. 2007-11-13 03:23:50 -08:00
proc_sysctl.c Fix pointer mismatches in proc_sysctl.c 2007-10-25 15:16:49 -07:00
proc_tty.c
root.c proc: fix NULL ->i_fop oops 2007-11-29 09:24:52 -08:00
task_mmu.c
task_nommu.c
vmcore.c