Skip to content
Commit 532b0f7e authored by Junwei Hu's avatar Junwei Hu Committed by David S. Miller
Browse files

tipc: fix modprobe tipc failed after switch order of device registration



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 7e27e8d6
("tipc: switch order of device registration to fix a crash")

Because sock_create_kern(net, AF_TIPC, ...) is called by
tipc_topsrv_create_listener() in the initialization process
of tipc_net_ops, tipc_socket_init() must be execute before that.

I move tipc_socket_init() into function tipc_init_net().

Fixes: 7e27e8d6
("tipc: switch order of device registration to fix a crash")
Signed-off-by: default avatarJunwei Hu <hujunwei4@huawei.com>
Reported-by: default avatarWang Wang <wangwang2@huawei.com>
Reviewed-by: default avatarKang Zhou <zhoukang7@huawei.com>
Reviewed-by: default avatarSuanming Mou <mousuanming@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 38a04b83
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment