Isolate some explicit usage of task->tgid
With pid namespaces this field is now dangerous to use explicitly, so hide it behind the helpers. Also the pid and pgrp fields o task_struct and signal_struct are to be deprecated. Unfortunately this patch cannot be sent right now as this leads to tons of warnings, so start isolating them, and deprecate later. Actually the p->tgid == pid has to be changed to has_group_leader_pid(), but Oleg pointed out that in case of posix cpu timers this is the same, and thread_group_leader() is more preferable. Signed-off-by:Pavel Emelyanov <xemul@openvz.org> Acked-by:
Oleg Nesterov <oleg@tv-sign.ru> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- fs/exec.c 2 additions, 2 deletionsfs/exec.c
- fs/proc/base.c 1 addition, 1 deletionfs/proc/base.c
- include/linux/sched.h 6 additions, 0 deletionsinclude/linux/sched.h
- kernel/posix-cpu-timers.c 6 additions, 6 deletionskernel/posix-cpu-timers.c
- kernel/posix-timers.c 2 additions, 2 deletionskernel/posix-timers.c
- kernel/ptrace.c 1 addition, 1 deletionkernel/ptrace.c
- kernel/signal.c 1 addition, 1 deletionkernel/signal.c
- mm/oom_kill.c 1 addition, 1 deletionmm/oom_kill.c
Loading
Please register or sign in to comment