Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 16 Sep 2002 07:12:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 16 Sep 2002 07:12:13 -0400 Received: from mx2.elte.hu ([157.181.151.9]:7559 "HELO mx2.elte.hu") by vger.kernel.org with SMTP id ; Mon, 16 Sep 2002 07:12:11 -0400 Date: Mon, 16 Sep 2002 13:23:59 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: OGAWA Hirofumi Cc: Linus Torvalds , , Daniel Jacobowitz Subject: Re: [PATCH] Fix for ptrace breakage In-Reply-To: <87it16kxtp.fsf@devron.myhome.or.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 920 Lines: 26 > This patch fixes the following, > > - race condition of ptrace flag > - sent odd signal to the tracer > - broken before behavior (looks good to me). I'm wondering about the following: - while (!list_empty(¤t->children)) - zap_thread(list_entry(current->children.next,struct task_struct,sibling), current, 0); - while (!list_empty(¤t->ptrace_children)) - zap_thread(list_entry(current->ptrace_children.next,struct task_struct,ptrace_list), current, 1); + while ((p = eldest_child(current)) != NULL) + zap_thread(p, current); BUG_ON(!list_empty(¤t->children)); is it guaranteed that at this point current->ptrace_children is empty? Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/