Re: [PATCH 09/15] clone.2: ERRORS: Add EACCESS with CLONE_INTO_CGROUP + clone3
From: Christian Brauner <hidden>
Date: 2021-09-13 10:13:42
From: Christian Brauner <hidden>
Date: 2021-09-13 10:13:42
On Sat, Sep 11, 2021 at 12:47:10AM +0200, Alejandro Colomar wrote:
[Andrew]: I noticed that clone3 can send the EACCES errno after I wrote a program that used clone3 with the CLONE_INTO_CGROUP flag. To me, it's important to know what kind of failure occurred if the clone3() fails, so I was glad that a unique errno is set for this case, but it wasn't documented on the clone man page. [Christian]:
Hey Alejandro, I was on vacation last week so just catching up with mails now.
In essence, any error that could occur during regular fs-based migration at write-time can also occur during CLONE_INTO_CGROUP. The clone3() manpage just has the inverse of that above statement: "Note that all of the usual restrictions (described in cgroups(7)) on placing a process into a version 2 cgroup apply." Reported-by: Andrew Wock <redacted> Acked-by: Christian Brauner <redacted> Signed-off-by: Alejandro Colomar <redacted> ---
Thanks for picking that up. Christian