diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-11-25 14:09:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-25 16:28:34 -0500 |
commit | 753ca4f312a4b26940e4731b4fa5dbbbbcc77e97 (patch) | |
tree | bf0ca9aa882e50b681ec72e43998542472752ef6 | |
parent | a1b26c32af51d0fd82754bc06b495dd03c2f2d58 (diff) |
[PATCH] fix copy_process() error check
The return value of copy_process() should be checked by IS_ERR().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/fork.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 3da978eec791..8cdd3e72ba55 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1315,9 +1315,8 @@ struct task_struct * __devinit fork_idle(int cpu) | |||
1315 | struct pt_regs regs; | 1315 | struct pt_regs regs; |
1316 | 1316 | ||
1317 | task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0); | 1317 | task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0); |
1318 | if (!task) | 1318 | if (!IS_ERR(task)) |
1319 | return ERR_PTR(-ENOMEM); | 1319 | init_idle(task, cpu); |
1320 | init_idle(task, cpu); | ||
1321 | 1320 | ||
1322 | return task; | 1321 | return task; |
1323 | } | 1322 | } |