Thread (4 messages) flat view 4 messages, 4 authors, 2012-01-28

Re: [PATCH 2/2] net caif: Register properly as a pernet subsystem.

From: Sasha Levin <hidden>
Date: 2012-01-27 13:24:31
Also in: lkml

On Thu, 2012-01-26 at 16:04 -0800, Eric W. Biederman wrote:
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 <redacted> 
I've tested these two patches as well, and they also work for me.

	Tested-by: Sasha Levin [off-list ref]

-- 

Sasha.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help