[CRIU] [PATCH v4 0/3] net: Create child with CLONE_VM in prepare_net_namespaces()
Andrei Vagin
avagin at virtuozzo.com
Tue Mar 21 10:38:23 PDT 2017
Applied, thanks!
On Tue, Mar 21, 2017 at 12:04:23PM +0300, Kirill Tkhai wrote:
> (This was a single patch in v2)
> (Differs to v3 in patch 3)
>
> The main problem, decided these patches, is that create_net_ns()
> calls functions, which alloc memory using xmalloc(). So, when
> it's called from child after clone(), this memory isn't seen
> in parent. Patch 3 fixes that using CLONE_VM argument of clone().
>
> Patch 1 is eye-found problem with mixing "return" and "exit"
> in prepare_userns_creds().
>
> Patch 2 is new test, which fails without patch 3 applied.
>
> When "[PATCH RFC] namespaces: use CLONE_VFORK with CLONE_VM when it is possible"
> is in tree, I'll rebase patch 3 on clone_nosan().
>
> ---
>
> Kirill Tkhai (3):
> ns: Fix return collison in prepare_userns_creds()
> zdtm: Add userns02 test
> net: Create child with CLONE_VM in prepare_net_namespaces()
>
>
> criu/include/namespaces.h | 1 +
> criu/namespaces.c | 4 ++--
> criu/net.c | 31 ++++++++++++++++++++++---------
> test/zdtm/static/Makefile | 2 ++
> test/zdtm/static/userns01.c | 8 ++++++--
> test/zdtm/static/userns02.c | 1 +
> test/zdtm/static/userns02.desc | 1 +
> 7 files changed, 35 insertions(+), 13 deletions(-)
> create mode 120000 test/zdtm/static/userns02.c
> create mode 120000 test/zdtm/static/userns02.desc
>
> --
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
More information about the CRIU
mailing list