[PATCH] sparc64: check fork_idle() error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>

---
 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);
 
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux