alistair23-linux/include
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
..
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-01-18 15:51:48 -08:00
asm-generic Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers 2012-01-14 18:03:30 -08:00
crypto crypto: serpent-sse2 - add lrw support 2011-11-21 16:13:24 +08:00
drm drm: bump DRM_CONNECTOR_MAX_ENCODER from 2 to 3 2012-01-13 09:01:09 +00:00
keys keys: add a "logon" key type 2012-01-17 22:39:40 -06:00
linux Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-01-24 15:51:40 -08:00
math-emu
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-18 12:53:54 -08:00
misc
mtd mtd: document that MEMWRITE ioctl is NAND-specific 2012-01-09 18:18:36 +00:00
net netns: Fail conspicously if someone uses net_generic at an inappropriate time. 2012-01-27 21:06:02 -05:00
pcmcia
rdma rdma/core: Fix sparse warnings 2012-01-04 09:17:45 -08:00
rxrpc
scsi [SCSI] libfc: Declare local functions static 2012-01-16 12:45:48 +04:00
sound Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound 2012-01-12 08:00:30 -08:00
target target: Set additional sense length field in sense data 2011-12-16 06:29:04 +00:00
trace Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2012-01-17 15:49:54 -08:00
video Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers 2012-01-14 18:03:30 -08:00
xen Merge branch 'for-3.3/drivers' of git://git.kernel.dk/linux-block 2012-01-15 12:48:41 -08:00
Kbuild