[Devel] Re: [PATCH 14/14][user-cr] Minimize unshare() calls

Serge E. Hallyn serue at us.ibm.com
Tue Mar 23 21:26:53 PDT 2010


Quoting Sukadev Bhattiprolu (sukadev at linux.vnet.ibm.com):
> 
> From: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
> Date: Mon, 8 Mar 2010 12:03:46 -0800
> Subject: [PATCH 14/14][user-cr] Minimize unshare() calls

Hmm, and yet, when I run cr_tests/simple.sh, restart apparently
does not use CLONE_NEWNS, bc I then have to
	umount /proc
	mount -t proc proc /proc
to restore sanity.

Not sure why...  restart -vd gives me

Using output dir ./cr_simple_N3wEpal
about to clone with 20020000
<3793>number of tasks: 1
<3793>total tasks (including ghosts): 1
<3793>====== TASKS
<3793>  [0] pid 1 ppid 0 sid 0 creator 0       
<3793>............
<3793>new pidns with init
<3793>forking child vpid 1 flags 0x21
<3793>forked child vpid 3795 (asked 1)
<1>root task pid 1
<1>pid 1: pid 1 sid 0 parent 0
<1>about to call sys_restart(), flags 0
<3794>====== PIDS ARRAY
<3794>[0] pid 1 ppid 0 sid 0 pgid 0
<3794>............
<3794>c/r read input 16384
<3794>c/r read input 16384
<3794>c/r read input 16384
<3794>c/r read input 16384
<3794>c/r read input 16384
<3794>c/r read input 11161
<3794>c/r read input 0
Success
<3793>restart succeeded
<3793>SIGCHLD: already collected
<3793>task exited with status 0
<3793>c/r succeeded
PASS

Oh, there you go - I suppose restart.c:557 should have TASK_NEWNS added?
Indeed that fixes that.

-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list