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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m17icjeeo5.fsf@frodo.ebiederm.org>
Date:	Fri, 20 Jun 2008 18:54:02 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	den@...nvz.org, xemul@...nvz.org, dlezcano@...ibm.com,
	benjamin.thery@...l.net
Subject: Re: [PATCH] netns: Don't receive new packets in a dead network namespace.

Alexey Dobriyan <adobriyan@...il.com> writes:

> On Sat, Jun 21, 2008 at 04:51:25AM +0400, Alexey Dobriyan wrote:
>> On Fri, Jun 20, 2008 at 05:17:05PM -0700, Eric W. Biederman wrote:
>> > --- a/include/net/net_namespace.h
>> > +++ b/include/net/net_namespace.h
>> > @@ -95,6 +95,11 @@ extern struct list_head net_namespace_list;
>> >  #ifdef CONFIG_NET_NS
>> >  extern void __put_net(struct net *net);
>> >  
>> > +static inline int net_alive(struct net *net)
>> > +{
>> > +	return net && atomic_read(&net->count);
>> > +}
>> 
>> netns pointers are always valid, right?

I think they should be.  Given that net_alive is designed
to be called when the invariants aren't as they should be
I was just paranoid when I wrote it.

> Patch seems to help, BTW.

Thanks.  It fixed the problem for me after I reproduced it.

Eric

--
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