sparc64: check fork_idle() error
PATCH 1/1 sparc64: check fork_idle() error
Check the return value of fork_idle() to catch error.
Cc "David S. Miller" <[email protected]>
Signed-off-by Akinobu Mita <[email protected]>
--- arch/sparc64/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+)
Index: 2.6-git/arch/sparc64/kernel/smp.c =================================--- 2.6-git.orig/arch/sparc64/kernel/smp.c +++ 2.6-git/arch/sparc64/kernel/smp.c
@@ -353,6 +353,8 @@ static int __devinit smp_boot_one_cpu(un
int timeout, ret;
p = fork_idle(cpu);
+ if (IS_ERR(p))
+ return PTR_ERR(p);
callin_flag = 0;
cpu_new_thread = task_thread_info(p);