]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix error path in kernel_thread function
authorJosh Poimboeuf <jpoimboe@us.ibm.com>
Tue, 7 Oct 2008 06:10:03 +0000 (06:10 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 10 Oct 2008 04:55:18 +0000 (15:55 +1100)
commit018abd0b5c9efbb7adccbcd5ede16813d4d92652
treec8ba92fa5cd1dc7f6293552704e639135008c343
parenta00e3ad16c5a63223146e1a71a2f8ff730459af4
powerpc: Fix error path in kernel_thread function

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@us.ibm.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/misc_64.S