[PATCH] powerpc: Fix error path in kernel_thread function

Josh Boyer jwboyer at linux.vnet.ibm.com
Thu Oct 23 22:56:04 EST 2008


On Thu, Oct 09, 2008 at 01:57:37PM +1100, Paul Mackerras wrote:
>Josh Boyer writes:
>
>> From: Josh Poimboeuf <jpoimboe at us.ibm.com>
>> 
>> 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 negating r3 if CR0[SO] is set after the syscall.
>> 
>> Signed-off-by: Josh Poimboeuf <jpoimboe at us.ibm.com>
>> Signed-off-by: Josh Boyer <jwboyer at linux.vnet.ibm.com>
>
>Acked-by: Paul Mackerras <paulus at samba.org>

Should we send this patch to -stable for 2.6.27?  Seems valid enough to
do so.

josh



More information about the Linuxppc-dev mailing list