Re: [PATCH] powerpc: Fix error path in kernel_thread function

2008-10-23 Thread Josh Boyer
On Thu, Oct 09, 2008 at 01:57:37PM +1100, Paul Mackerras wrote: >Josh Boyer writes: > >> From: Josh Poimboeuf <[EMAIL PROTECTED]> >> >> The powerpc 32-bit and 64-bit kernel_thread functions don't properly >> propagate errors being returned by the clone syscall. (In the case of >> error, the sysca

Re: [PATCH] powerpc: Fix error path in kernel_thread function

2008-10-08 Thread Paul Mackerras
Josh Boyer writes: > From: Josh Poimboeuf <[EMAIL PROTECTED]> > > The powerpc 32-bit and 64-bit kernel_thread functions don't properly > propagate errors being returned by the clone syscall. (In the case of > error, the syscall exit code returns a positive errno in r3 and sets > the CR0[SO] bit.

Re: [PATCH] powerpc: Fix error path in kernel_thread function

2008-10-07 Thread Segher Boessenkool
- cmpwi 0,r3,0 /* parent or child? */ - bne 1f /* return if parent */ + bns+1f /* did system call indicate error? */ + neg r3,r3 /* if so, make return code negative */ +1: cmpwi 0,r3,0 /* parent or ch

Re: [PATCH] powerpc: Fix error path in kernel_thread function

2008-10-07 Thread Josh Boyer
On Tue, Oct 07, 2008 at 12:10:03PM -0400, Josh Boyer wrote: >From: Josh Poimboeuf <[EMAIL PROTECTED]> > >The powerpc 32-bit and 64-bit kernel_thread functions don't properly >propagate errors being returned by the clone syscall. (In the case of >error, the syscall exit code returns a positive errn

[PATCH] powerpc: Fix error path in kernel_thread function

2008-10-07 Thread Josh Boyer
From: Josh Poimboeuf <[EMAIL PROTECTED]> The powerpc 32-bit and 64-bit kernel_thread functions don't properly propagate errors being returned by the clone syscall. (In the case of error, the syscall exit code returns a positive errno in r3 and sets the CR0[SO] bit.) This patch fixes that by nega