[PATCH] correct error message for failed clone ns

From: Andries.Brouwer@cwi.nl
Date: Sat Apr 19 2003 - 16:23:12 EST


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/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:26 EST