public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, Andreas Hobein <ah2@delair.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Roland McGrath <roland@redhat.com>
Subject: [PATCH] eligible_child: remove an obsolete ->tgid check
Date: Sat, 2 Sep 2006 21:22:16 +0400	[thread overview]
Message-ID: <20060902172216.GA456@oleg> (raw)
In-Reply-To: <Pine.LNX.4.64.0609011117440.27779@g5.osdl.org>

It is not possible to find a sub-thread in ->children/->ptrace_children
lists, ptrace_attach() does not allow to attach to sub-threads.

Even if it was possible to ptrace the task from the same thread group,
we can't allow to release ->group_leader while there are others (ptracer)
threads in the same group.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 2.6.18-rc4/kernel/exit.c~	2006-09-02 21:08:59.000000000 +0400
+++ 2.6.18-rc4/kernel/exit.c	2006-09-02 21:09:12.000000000 +0400
@@ -1051,7 +1051,7 @@ static int eligible_child(pid_t pid, int
 	 * Do not consider thread group leaders that are
 	 * in a non-empty thread group:
 	 */
-	if (current->tgid != p->tgid && delay_group_leader(p))
+	if (delay_group_leader(p))
 		return 2;
 
 	if (security_task_wait(p))


-- 
VGER BF report: U 0.499788

      parent reply	other threads:[~2006-09-02 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 21:05 Trouble with ptrace self-attach rule since kernel > 2.6.14 Andreas Hobein
2006-09-01  7:36 ` Andreas Hobein
2006-09-01  7:49   ` Andrew Morton
2006-09-01 18:28     ` Linus Torvalds
2006-09-02 17:03       ` Oleg Nesterov
2006-09-04 12:16         ` Andreas Hobein
2006-09-04 15:23           ` Oleg Nesterov
2006-09-04 15:56             ` Andreas Hobein
2006-09-04 21:42               ` Andreas Hobein
2006-09-04 22:00                 ` Linus Torvalds
2006-09-04 20:07             ` Markus Gutschke
2006-09-02 17:22       ` Oleg Nesterov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060902172216.GA456@oleg \
    --to=oleg@tv-sign.ru \
    --cc=ah2@delair.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox