All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp.com>
To: netdev@vger.kernel.org
Subject: A question about deleting a network namespace while something is executing in another
Date: Thu, 19 Sep 2013 15:10:54 -0700	[thread overview]
Message-ID: <523B766E.7000505@hp.com> (raw)

I've been messing about (as a user) with network namespaces and 
something I call the "thing1/thing2" problem and have a question.  In a 
3.5 kernel if I do:

root@tardy:~# ip netns add thing1
root@tardy:~# ip netns add thing2
root@tardy:~# ip netns exec thing2 sleep 15 &
[1] 27247
root@tardy:~# ip netns del thing1
Cannot remove /var/run/netns/thing1: Device or resource busy
root@tardy:~#
[1]+  Done                    ip netns exec thing2 sleep 15
root@tardy:~# ip netns del thing1
root@tardy:~#

You can see that netns thing1 cannot be deleted while there is an active 
ip netns exec in thing2.

I see the same thing on a 3.8 kernel, and a 3.10 kernel.  In a 3.11.0 
kernel though I see:

~# ip netns add thing1
~# ip netns add thing2
~# ip netns exec thing2 sleep 15 &
[1] 2264
~# ip netns del thing1
~#
~# uname -a
Linux lefty 3.11.0-7-generic #13-Ubuntu SMP Tue Sep 10 20:55:38 UTC 2013 
x86_64 x86_64 x86_64 GNU/Linux

which suggests that the limitation on deleting a namespace while 
something was executing in another was removed.  Happiness and joy ensues.

However...  if I now go to a 3.11.1 kernel built from a clone of 
linux-stable I see:

~# uname -a
Linux lucy 3.11.1 #9 SMP Thu Sep 19 17:11:50 UTC 2013 x86_64 x86_64 
x86_64 GNU/Linux
~# ip netns add thing1
~# ip netns add thing2
~# ip netns exec thing2 sleep 15 &
[1] 22766
~# ip netns del thing1
Cannot remove /var/run/netns/thing1: Device or resource busy
root@qu-stbaz1-perf0001:~#
[1]+  Done                    ip netns exec thing2 sleep 15
~# ip netns del thing1


Did an enhancement get (inadvertently) reverted?  Or perhaps something 
not get added to 3.11.1 that was put into the  3.11.0-7-generic kernel 
(admittedly, I've a slightly mixed set of lineages - the 3.5, 3.8 and 
3.11.0 kernels have passed through Canonical, and the 3.10 and 3.11.1 
kernels came from linux-stable.

And here is 3.12.0rc1, from linux-stable:
~# ip netns add thing1
~# ip netns add thing2
~# ip netns exec thing2 sleep 15 &
[1] 3490
~# ip netns del thing1
Cannot remove /var/run/netns/thing1: Device or resource busy
~#
[1]+  Done                    ip netns exec thing2 sleep 15
~# ip netns del thing1
root@qu-stbaz1-perf0001:~# uname -a
Linux lucy 3.12.0-rc1 #10 SMP Thu Sep 19 21:24:36 UTC 2013 x86_64 x86_64 
x86_64 GNU/Linux

rick jones

                 reply	other threads:[~2013-09-19 22:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=523B766E.7000505@hp.com \
    --to=rick.jones2@hp.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.