[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061122183654.GB2985@APFDCB5C>
Date: Thu, 23 Nov 2006 03:36:54 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...l.org>
Subject: [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@...il.com>
---
kernel/fork.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: work-fault-inject/kernel/fork.c
===================================================================
--- work-fault-inject.orig/kernel/fork.c
+++ work-fault-inject/kernel/fork.c
@@ -1318,9 +1318,8 @@ struct task_struct * __devinit fork_idle
struct pt_regs regs;
task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0);
- if (!task)
- return ERR_PTR(-ENOMEM);
- init_idle(task, cpu);
+ if (!IS_ERR(task))
+ init_idle(task, cpu);
return task;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists