summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-19 10:40:18 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 22:53:40 +0400
commitbac0abd6174e427404dd197cdbefece31e97329b (patch)
tree68ed6bd8619552c921c9fb99e83cb04fcb235a39 /mm
parent19b9b9b54e5f115907efd56be2c3799775a46561 (diff)
downloadlinux-bac0abd6174e427404dd197cdbefece31e97329b.tar.xz
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 'mm')
-rw-r--r--mm/oom_kill.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index a7cb4c43fd11..e3778f1215c0 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -326,7 +326,7 @@ static int oom_kill_task(struct task_struct *p)
* to memory reserves though, otherwise we might deplete all memory.
*/
do_each_thread(g, q) {
- if (q->mm == mm && q->tgid != p->tgid)
+ if (q->mm == mm && !same_thread_group(q, p))
force_sig(SIGKILL, q);
} while_each_thread(g, q);