diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-01-26 14:04:53 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-27 21:06:03 -0500 |
commit | 8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6 (patch) | |
tree | bb905513ac457b8e7204056a17345ad3a5888db6 /net/caif/cfcnfg.c | |
parent | 5ee4433efe99b9f39f6eff5052a177bbcfe72cea (diff) | |
download | linux-3.10-8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6.tar.gz linux-3.10-8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6.tar.bz2 linux-3.10-8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6.zip |
net caif: Register properly as a pernet subsystem.
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>
Diffstat (limited to 'net/caif/cfcnfg.c')
-rw-r--r-- | net/caif/cfcnfg.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c index 598aafb4cb5..ba9cfd47778 100644 --- a/net/caif/cfcnfg.c +++ b/net/caif/cfcnfg.c @@ -309,7 +309,6 @@ int caif_connect_client(struct net *net, struct caif_connect_request *conn_req, int err; struct cfctrl_link_param param; struct cfcnfg *cfg = get_cfcnfg(net); - caif_assert(cfg != NULL); rcu_read_lock(); err = caif_connect_req_to_link_param(cfg, conn_req, ¶m); |