forked from checkpoint-restore/criu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pid_ns: Set user_ns before creation of pid_ns
Since child's pid_ns may have user_ns not equal to parent's, and we do not want to lose parent's user_ns (as it's not possible to restore it back), create the child from a sub-process. v3: New Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> +++ restore: Simplify do_fork_with_pid() memcpy() is not need here, as we rewrite all the fields later. Also, use PID_SIZE() helper. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> +++ restore: Simplify do_fork_with_pid() #2 Move xfree() up Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> +++ restore: Delete excess code in call_clone_fn() We never call this function for root_item. It's for dropping user ns, which may happen with the rest of tasks only. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> +++ ns: Move forked task user_ns assignment Child reaper of a ns have initial user_ns equal to its pid_ns->user_ns. Keep all ns assignments together. v2: Delete the assignment from call_clone_fn() and rename patch. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> rebase: merge fixups, add some sanity BUG_ON's Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
- Loading branch information
Showing
1 changed file
with
125 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters