linux-uconsole/net/caif
Eric W. Biederman 62252cba28 net caif: Register properly as a pernet subsystem.
[ Upstream commit 8a8ee9aff6 ]

caif is a subsystem and as such it needs to register with
register_pernet_subsys instead of register_pernet_device.

Among other problems using register_pernet_device was resulting in
net_generic being called before the caif_net structure was allocated.
Which has been causing net_generic to fail with either BUG_ON's or by
return NULL pointers.

A more ugly problem that could be caused is packets in flight why the
subsystem is shutting down.

To remove confusion also remove the cruft cause by inappropriately
trying to fix this bug.

With the aid of the previous patch I have tested this patch and
confirmed that using register_pernet_subsys makes the failure go away as
it should.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.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>
2012-02-03 09:19:03 -08:00
..
caif_dev.c net caif: Register properly as a pernet subsystem. 2012-02-03 09:19:03 -08:00
caif_socket.c caif: Fixes freeze on Link layer removal. 2011-05-22 20:11:47 -04:00
cfcnfg.c net caif: Register properly as a pernet subsystem. 2012-02-03 09:19:03 -08:00
cfctrl.c caif: Fix freezes when running CAIF loopback device 2011-05-22 20:11:48 -04:00
cfdbgl.c caif: Bugfix for socket priority, bindtodev and dbg channel. 2010-11-03 18:50:03 -07:00
cfdgml.c caif: Don't resend if dev_queue_xmit fails. 2011-04-11 15:08:48 -07:00
cffrml.c caif: Handle dev_queue_xmit errors. 2011-05-15 17:45:56 -04:00
cfmuxl.c caif: Bugfix - XOFF removed channel from caif-mux 2011-06-16 23:59:09 -04:00
cfpkt_skbuff.c caif: remove unesesarry exports 2011-05-15 17:45:56 -04:00
cfrfml.c caif: Move refcount from service layer to sock and dev. 2011-05-15 17:45:55 -04:00
cfserl.c caif: Don't resend if dev_queue_xmit fails. 2011-04-11 15:08:48 -07:00
cfsrvl.c caif: Move refcount from service layer to sock and dev. 2011-05-15 17:45:55 -04:00
cfutill.c caif: Don't resend if dev_queue_xmit fails. 2011-04-11 15:08:48 -07:00
cfveil.c caif: Handle dev_queue_xmit errors. 2011-05-15 17:45:56 -04:00
cfvidl.c caif: Don't resend if dev_queue_xmit fails. 2011-04-11 15:08:48 -07:00
chnl_net.c caif: Fix race when conditionally taking rtnl lock 2011-06-01 21:13:53 -07:00
Kconfig caif: Kconfig and Makefile fixes 2010-06-29 00:06:38 -07:00
Makefile caif: prepare support for namespaces 2011-05-15 17:45:55 -04:00