aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif/cfcnfg.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-26 14:02:55 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-03 09:19:03 -0800
commitcc1be3611bae365c2399f5208732ddd0969cf46d (patch)
tree892deefa265dd115d635ac8edc2aba11558bd3d2 /net/caif/cfcnfg.c
parent561331eae0a03d0c4cf60f3cf485aa3e8aa5ab48 (diff)
downloadkernel_samsung_espresso10-cc1be3611bae365c2399f5208732ddd0969cf46d.zip
kernel_samsung_espresso10-cc1be3611bae365c2399f5208732ddd0969cf46d.tar.gz
kernel_samsung_espresso10-cc1be3611bae365c2399f5208732ddd0969cf46d.tar.bz2
netns: Fail conspicously if someone uses net_generic at an inappropriate time.
[ Upstream commit 5ee4433efe99b9f39f6eff5052a177bbcfe72cea ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/caif/cfcnfg.c')
0 files changed, 0 insertions, 0 deletions