From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261276AbTLCUz4 (ORCPT ); Wed, 3 Dec 2003 15:55:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261406AbTLCUz4 (ORCPT ); Wed, 3 Dec 2003 15:55:56 -0500 Received: from fw.osdl.org ([65.172.181.6]:63116 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261276AbTLCUzw (ORCPT ); Wed, 3 Dec 2003 15:55:52 -0500 Date: Wed, 3 Dec 2003 12:55:23 -0800 (PST) From: Linus Torvalds To: Ingo Molnar cc: Manfred Spraul , Srivatsa Vaddagiri , Raj , linux-kernel@vger.kernel.org, lhcs-devel@lists.sourceforge.net Subject: Re: kernel BUG at kernel/exit.c:792! In-Reply-To: Message-ID: References: <20031203153858.C14999@in.ibm.com> <3FCDCEA3.1020209@mailandnews.com> <20031203182319.D14999@in.ibm.com> <3FCE453D.9080701@colorfullife.com> 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 On Wed, 3 Dec 2003, Ingo Molnar wrote: > > On Wed, 3 Dec 2003, Manfred Spraul wrote: > > > It's wrong, because next_thread() relies on > > > > task->pids[PIDTYPE_TGID].pid_chain.next > > > > That pointer is not valid after detach_pid(task, PIDTYPE_TGID), and > > that's called within __unhash_process. Thus next_thread() fails if it's > > called on a dead task. Srivatsa's second patch is the right change: If > > pid_alive() is wrong, then break from the loop without calling > > next_thread(). > > yes. And for thread groups this can only happen for the thread group > leader if all 'child' threads have exited. Ok, color me convinced. Will apply, Linus