Skip to content
Unverified Commit 10dab84c authored by Christian Brauner's avatar Christian Brauner
Browse files

pid: make ENOMEM return value more obvious



The alloc_pid() codepath used to be simpler. With the introducation of the
ability to choose specific pids in 49cb2fc4 ("fork: extend clone3() to
support setting a PID") it got more complex. It hasn't been super obvious
that ENOMEM is returned when the pid namespace init process/child subreaper
of the pid namespace has died. As can be seen from multiple attempts to
improve this see e.g. [1] and most recently [2].
We regressed returning ENOMEM in [3] and [2] restored it. Let's add a
comment on top explaining that this is historic and documented behavior and
cannot easily be changed.

[1]: 35f71bc0 ("fork: report pid reservation failure properly")
[2]: b26ebfe1 ("pid: Fix error return value in some cases")
[3]: 49cb2fc4 ("fork: extend clone3() to support setting a PID")
Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent b26ebfe1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment