mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
fork: allow CLONE_NEWTIME in clone3 flags
commita402f1e353
upstream. Currently, calling clone3() with CLONE_NEWTIME in clone_args->flags fails with -EINVAL. This is because CLONE_NEWTIME intersects with CSIGNAL. However, CSIGNAL was deprecated when clone3 was introduced in commit7f192e3cd3
("fork: add clone3"), allowing re-use of that part of clone flags. Fix this by explicitly allowing CLONE_NEWTIME in clone3_args_valid. This is also in line with the respective check in check_unshare_flags which allow CLONE_NEWTIME for unshare(). Fixes:769071ac9f
("ns: Introduce Time Namespace") Cc: Andrey Vagin <avagin@openvz.org> Cc: Christian Brauner <brauner@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a759905de9
commit
a1eb8bf1e3
1 changed files with 1 additions and 1 deletions
|
@ -2726,7 +2726,7 @@ static bool clone3_args_valid(struct kernel_clone_args *kargs)
|
|||
* - make the CLONE_DETACHED bit reuseable for clone3
|
||||
* - make the CSIGNAL bits reuseable for clone3
|
||||
*/
|
||||
if (kargs->flags & (CLONE_DETACHED | CSIGNAL))
|
||||
if (kargs->flags & (CLONE_DETACHED | (CSIGNAL & (~CLONE_NEWTIME))))
|
||||
return false;
|
||||
|
||||
if ((kargs->flags & (CLONE_SIGHAND | CLONE_CLEAR_SIGHAND)) ==
|
||||
|
|
Loading…
Reference in a new issue