lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Mar 2015 18:50:11 +0200
From:	Vadim Kochan <vadim4j@...il.com>
To:	Cong Wang <cwang@...pensource.com>
Cc:	Vadim Kochan <vadim4j@...il.com>, netdev <netdev@...r.kernel.org>
Subject: Re: iproute2: ip netns: Do not delete netns if there any process use
 it

On Wed, Mar 11, 2015 at 09:38:04AM -0700, Cong Wang wrote:
> On Wed, Mar 11, 2015 at 12:40 AM, Vadim Kochan <vadim4j@...il.com> wrote:
> >
> > Hi,
> >
> > There might be case when it is possible to loose device which was
> > moved to netns if there is process which is running is that netns:
> >
> >     $ ip netns add net
> >     $ ip link set dev eth0 netns net0
> >     $ ip netns exec net0 SOME_PROCESS_IN_BACKGROUND
> >     $ ip netns del net0
> >
> > so eth0 will not appear in the default netns until SOME_PROCESS_IN_BACKGROUND will exit or
> > will ne killed. So to avoid such case it might be better to do not
> > delete netns if there are process in it ? I meant add such validation
> > for 'ip netns del' command.
> 
> No, kernel does all the reference counting, no need to bother iproute2.

Sure kernel does and after net0 file was deleted the devices will be
still alive within net0 till all processes within net0 will exit or will
be killed. And there might be case that after deleting net0 it might be
hard to find these processes and kill them to bring back devices from
net0 to the initial netns.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ