Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422910AbWBBEkV (ORCPT ); Wed, 1 Feb 2006 23:40:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422918AbWBBEkV (ORCPT ); Wed, 1 Feb 2006 23:40:21 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:58279 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S1422910AbWBBEkU (ORCPT ); Wed, 1 Feb 2006 23:40:20 -0500 To: Oleg Nesterov Cc: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH rc1-mm] simplify exec from init's subthread References: <200601312208.k0VM8hT4002399@shell0.pdx.osdl.net> <43E10F5D.54A0B990@tv-sign.ru> From: ebiederm@xmission.com (Eric W. Biederman) Date: Wed, 01 Feb 2006 21:39:41 -0700 In-Reply-To: <43E10F5D.54A0B990@tv-sign.ru> (Oleg Nesterov's message of "Wed, 01 Feb 2006 22:43:25 +0300") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) 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: 1078 Lines: 31 Oleg Nesterov writes: > [ On top of "exec: allow init to exec from any thread.", > filename exec-allow-init-to-exec-from-any-thread.patch ] > > I think it is enough to take tasklist_lock for reading while > changing child_reaper: > > Reparenting needs write_lock(tasklist_lock) > > Only one thread in a thread group can do exec() > > sighand->siglock garantees that get_signal_to_deliver() > will not see a stale value of child_reaper. > > This means that we can change child_reaper earlier, without > calling zap_other_threads() twice. > > "child_reaper = current" is a NOOP when init does exec from > main thread, we don't care. Looks good. I fat fingered my locking anyway, and this looks like a good fix, as well as the more obvious place, to do this. Acked-by: Eric Biederman - 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/