From: Josh Poimboeuf Date: Tue, 7 Oct 2008 06:10:03 +0000 (+0000) Subject: powerpc: Fix error path in kernel_thread function X-Git-Tag: v2.6.28-rc1~569^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41c2e949cb7b80c5a6247c7df97759953b0f71b5;p=pandora-kernel.git 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 Signed-off-by: Josh Boyer Acked-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed