[PATCH] correct error message for failed clone ns

Andries.Brouwer@cwi.nl
Sat, 19 Apr 2003 23:23:12 +0200 (MEST)


If copy_namespace() returns -EPERM, copy_process() will
return a confusing -ENOMEM. This fixes that.

Andries

----------------------------------------------------------------
diff -u --recursive --new-file -X /linux/dontdiff a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c Sat Apr 19 18:27:16 2003
+++ b/kernel/fork.c Sat Apr 19 18:27:07 2003
@@ -873,7 +873,8 @@
goto bad_fork_cleanup_sighand;
if (copy_mm(clone_flags, p))
goto bad_fork_cleanup_signal;
- if (copy_namespace(clone_flags, p))
+ retval = copy_namespace(clone_flags, p);
+ if (retval)
goto bad_fork_cleanup_mm;
retval = copy_thread(0, clone_flags, stack_start, stack_size, p, regs);
if (retval)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/