Reviewed and tested. I found no problems with this.

Reviewed-by: Jon Maloy <jon.ma...@ericsson.com>


> -----Original Message-----
> From: netdev-ow...@vger.kernel.org <netdev-ow...@vger.kernel.org>
> On Behalf Of David Miller
> Sent: 20-May-19 13:46
> To: hujunw...@huawei.com
> Cc: Jon Maloy <jon.ma...@ericsson.com>; ying....@windriver.com;
> willemdebruijn.ker...@gmail.com; s...@canb.auug.org.au;
> net...@vger.kernel.org; tipc-discuss...@lists.sourceforge.net; linux-
> ker...@vger.kernel.org; mingfang...@huawei.com
> Subject: Re: [PATCH v4] tipc: fix modprobe tipc failed after switch order of
> device registration
> 
> From: hujunwei <hujunw...@huawei.com>
> Date: Mon, 20 May 2019 14:43:59 +0800
> 
> > From: Junwei Hu <hujunw...@huawei.com>
> >
> > Error message printed:
> > modprobe: ERROR: could not insert 'tipc': Address family not supported
> > by protocol.
> > when modprobe tipc after the following patch: switch order of device
> > registration, commit 7e27e8d6130c
> > ("tipc: switch order of device registration to fix a crash")
> >
> > Because sock_create_kern(net, AF_TIPC, ...) called by
> > tipc_topsrv_create_listener() in the initialization process of
> > tipc_init_net(), so tipc_socket_init() must be execute before that.
> > Meanwhile, tipc_net_id need to be initialized when sock_create()
> > called, and tipc_socket_init() is no need to be called for each namespace.
> >
> > I add a variable tipc_topsrv_net_ops, and split the
> > register_pernet_subsys() of tipc into two parts, and split
> > tipc_socket_init() with initialization of pernet params.
> >
> > By the way, I fixed resources rollback error when tipc_bcast_init()
> > failed in tipc_init_net().
> >
> > Fixes: 7e27e8d6130c ("tipc: switch order of device registration to fix
> > a crash")
> > Signed-off-by: Junwei Hu <hujunw...@huawei.com>
> > Reported-by: Wang Wang <wangwa...@huawei.com>
> > Reported-by: syzbot+1e8114b61079bfe9c...@syzkaller.appspotmail.com
> > Reviewed-by: Kang Zhou <zhouka...@huawei.com>
> > Reviewed-by: Suanming Mou <mousuanm...@huawei.com>
> 
> Applied.

Reply via email to