diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-19 02:40:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:40 -0400 |
commit | bac0abd6174e427404dd197cdbefece31e97329b (patch) | |
tree | 68ed6bd8619552c921c9fb99e83cb04fcb235a39 /kernel/signal.c | |
parent | 19b9b9b54e5f115907efd56be2c3799775a46561 (diff) |
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>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 783b33a0af06..08364e75bb58 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1150,7 +1150,7 @@ static int kill_something_info(int sig, struct siginfo *info, int pid) | |||
1150 | 1150 | ||
1151 | read_lock(&tasklist_lock); | 1151 | read_lock(&tasklist_lock); |
1152 | for_each_process(p) { | 1152 | for_each_process(p) { |
1153 | if (p->pid > 1 && p->tgid != current->tgid) { | 1153 | if (p->pid > 1 && !same_thread_group(p, current)) { |
1154 | int err = group_send_sig_info(sig, info, p); | 1154 | int err = group_send_sig_info(sig, info, p); |
1155 | ++count; | 1155 | ++count; |
1156 | if (err != -EPERM) | 1156 | if (err != -EPERM) |