From patchwork Fri Oct 5 13:44:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 1553211 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 366073FCFC for ; Fri, 5 Oct 2012 13:44:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754802Ab2JENo2 (ORCPT ); Fri, 5 Oct 2012 09:44:28 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:51263 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754048Ab2JENo2 (ORCPT ); Fri, 5 Oct 2012 09:44:28 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id DF1CD8EE0E6; Fri, 5 Oct 2012 06:44:27 -0700 (PDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CTKQIff5Enpq; Fri, 5 Oct 2012 06:44:27 -0700 (PDT) Received: from [153.66.254.224] (accolon.hansenpartnership.com [87.194.65.0]) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 00C478EE0CE; Fri, 5 Oct 2012 06:44:26 -0700 (PDT) Message-ID: <1349444664.3638.46.camel@dabdike.int.hansenpartnership.com> Subject: Re: what's parisc execve_wrapper doing in the end? From: James Bottomley To: Al Viro Cc: Parisc List Date: Fri, 05 Oct 2012 14:44:24 +0100 In-Reply-To: <1349435268.3638.42.camel@dabdike.int.hansenpartnership.com> References: <20121004045150.GH23473@ZenIV.linux.org.uk> <1349343019.2706.3.camel@dabdike.int.hansenpartnership.com> <1349435268.3638.42.camel@dabdike.int.hansenpartnership.com> X-Mailer: Evolution 3.4.4 Mime-Version: 1.0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org On Fri, 2012-10-05 at 12:07 +0100, James Bottomley wrote: > I tried out the code at > > git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal.git > experimental-kernel_thread > > and it gives me this panic on boot. OK, found the fix: the idle thread is a kernel thread, but it doesn't come through kernel_thread(). The fix is to check for it (fortunately it has the signal usp == 0). I'm now getting as freeing the init memory, which then hangs, so I suspect some type of execve failure trying to start the initrd... I'm debugging. James --- -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index a67f122..44e8534 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -254,7 +254,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, extern void * const hpux_child_return; #endif - if (unlikely(p->flags & PF_KTHREAD)) { + if (unlikely((p->flags & PF_KTHREAD) && usp != 0)) { memset(cregs, 0, sizeof(struct pt_regs)); /* kernel thread */ cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN;