linux_old1/include/net/netns
Eric W. Biederman 5ee4433efe netns: Fail conspicously if someone uses net_generic at an inappropriate time.
By definition net_generic should never be called when it can return
NULL.  Fail conspicously with a BUG_ON to make it clear when people mess
up that a NULL return should never happen.

Recently there was a bug in the CAIF subsystem where it was registered
with register_pernet_device instead of register_pernet_subsys.  It was
erroneously concluded that net_generic could validly return NULL and
that net_assign_generic was buggy (when it was just inefficient).
Hopefully this BUG_ON will prevent people to coming to similar erroneous
conclusions in the futrue.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-27 21:06:02 -05:00
..
conntrack.h netfilter: nf_conntrack: make event callback registration per-netns 2011-11-22 00:34:47 +01:00
core.h percpu: add __percpu sparse annotations to net 2010-02-16 23:05:38 -08:00
dccp.h [NETNS][DCCPV6]: Move the dccp_v6_ctl_sk on the struct net. 2008-04-13 22:32:25 -07:00
generic.h netns: Fail conspicously if someone uses net_generic at an inappropriate time. 2012-01-27 21:06:02 -05:00
hash.h netns: introduce the net_hash_mix "salt" for hashes 2008-06-16 17:14:11 -07:00
ipv4.h per-netns ipv4 sysctl_tcp_mem 2011-12-12 19:04:11 -05:00
ipv6.h ipv6: ip6mr: support multiple tables 2010-05-11 14:40:55 +02:00
mib.h net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
packet.h packet: convert socket list to RCU (v3) 2010-02-22 15:45:56 -08:00
unix.h [NETNS]: struct net content re-work (v3) 2008-01-28 14:57:14 -08:00
x_tables.h net, netns_xt: shrink netns_xt members 2009-07-05 19:16:18 -07:00
xfrm.h net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00