On Fri, 2012-10-05 at 14:44 +0100, James Bottomley wrote: > 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. And the fix for this one is below: ret_from_kernel_execve has pt_regs in %r26 ... it needs to be in %r16 for intr_return, so we just copy them over. With this, I can bring up the kernel all the way to a login prompt with no apparent ill effects. James --- diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 272c7a0..dd137fc 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -744,7 +744,8 @@ ENDPROC(ret_from_kernel_thread) ENTRY(ret_from_kernel_execve) mfctl %cr30, %r1 ldo THREAD_SZ_ALGN(%r1), %r30 - b,n intr_return /* forward */ + b intr_return /* forward */ + copy %r26,%r16 /* pt_regs into r16 */ ENDPROC(ret_from_kernel_execve) -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html