aboutsummaryrefslogtreecommitdiff
path: root/kernel/pid.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2020-03-23 08:04:08 +0100
committerGreg Kroah-Hartman2020-03-23 08:04:08 +0100
commitd2e971d884e7b7e65162788b8f3b7801cd8bc137 (patch)
tree5f95f2e0e98d4181c50301e6dfa39cc87aa1c17a /kernel/pid.c
parente79220db6349344b6e770f0cae7e26d8636c1440 (diff)
parent16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff)
Merge 5.6-rc7 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index 0f4ecb57214c..647b4bb457b5 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -247,6 +247,16 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
tmp = tmp->parent;
}
+ /*
+ * ENOMEM is not the most obvious choice especially for the case
+ * where the child subreaper has already exited and the pid
+ * namespace denies the creation of any new processes. But ENOMEM
+ * is what we have exposed to userspace for a long time and it is
+ * documented behavior for pid namespaces. So we can't easily
+ * change it even if there were an error code better suited.
+ */
+ retval = -ENOMEM;
+
if (unlikely(is_child_reaper(pid))) {
if (pid_ns_prepare_proc(ns))
goto out_free;