mirror of https://github.com/torvalds/linux.git
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> |
||
|---|---|---|
| .. | ||
| Makefile | ||
| array.c | ||
| base.c | ||
| generic.c | ||
| inode-alloc.txt | ||
| inode.c | ||
| internal.h | ||
| kcore.c | ||
| kmsg.c | ||
| mmu.c | ||
| nommu.c | ||
| proc_devtree.c | ||
| proc_misc.c | ||
| proc_net.c | ||
| proc_sysctl.c | ||
| proc_tty.c | ||
| root.c | ||
| task_mmu.c | ||
| task_nommu.c | ||
| vmcore.c | ||