diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-01-26 14:04:53 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-03 09:19:03 -0800 |
commit | 62252cba2867cec7cc484ebb2d3ec705c41d9684 (patch) | |
tree | 6ef434ccb5c7ddf7fe593d82716ca72f73099427 /block/bsg.c | |
parent | cc1be3611bae365c2399f5208732ddd0969cf46d (diff) | |
download | kernel_samsung_espresso10-62252cba2867cec7cc484ebb2d3ec705c41d9684.zip kernel_samsung_espresso10-62252cba2867cec7cc484ebb2d3ec705c41d9684.tar.gz kernel_samsung_espresso10-62252cba2867cec7cc484ebb2d3ec705c41d9684.tar.bz2 |
net caif: Register properly as a pernet subsystem.
[ Upstream commit 8a8ee9aff6c3077dd9c2c7a77478e8ed362b96c6 ]
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>
Diffstat (limited to 'block/bsg.c')
0 files changed, 0 insertions, 0 deletions