[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080621005125.GA5711@martell.zuzino.mipt.ru>
Date: Sat, 21 Jun 2008 04:51:25 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: "Eric W. Biederman" <ebiederm@...ssion.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.
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?
--
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