2.6.35: unshare(NEWNS) does not work inside a container anymore?
Serge E. Hallyn
serge at hallyn.com
Wed Sep 1 09:28:33 PDT 2010
Quoting Michael Tokarev (mjt at tls.msk.ru):
> I just noticed a regression - immediately after updating
> kernel from 2.6.32 to 2.6.35 (I skipped .33 and .34).
> Namely, unshare(CLONE_NEWNS) stopped workin from within
> a container, like this:
> unshare(CLONE_NEWNS) = -1 EINVAL (Invalid argument)
> There's no other fancy stuff going on around, just plain
> unshare and exec a new shell.
I'm not seeing this behavior. I'm on 2.6.35-19-generic (ubuntu
maverick), created a lucid container with the standard template,
and tested with ns_exec
(git clone git://git.sr71.net/~hallyn/cr_tests.git;
git checkout ns_exec; make ns_exec;
ns_exec -m /bin/bash; play with mounts; exit)
Can you give us /proc/self/status and capsh --print output
from inside the container before you try to unshare, and
maybe strace output from the program you were using?
> What's wrong with 2.6.35 in this context?
> Containers mailing list
> Containers at lists.linux-foundation.org
More information about the Containers