소스 검색

[SPARC64]: check fork_idle() error

Check the return value of fork_idle() to catch error.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Akinobu Mita 18 년 전
부모
커밋
1177bf9704
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      arch/sparc64/kernel/smp.c

+ 2 - 0
arch/sparc64/kernel/smp.c

@@ -353,6 +353,8 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
 	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);