android_kernel_oneplus_msm8998/net/tipc
Junwei Hu 65d14634b6 tipc: fix modprobe tipc failed after switch order of device registration
[ Upstream commit 532b0f7ece4cb2ffd24dc723ddf55242d1188e5e ]

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, ...) 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: 7e27e8d6130c
("tipc: switch order of device registration to fix a crash")
Signed-off-by: Junwei Hu <hujunwei4@huawei.com>
Reported-by: Wang Wang <wangwang2@huawei.com>
Reviewed-by: Kang Zhou <zhoukang7@huawei.com>
Reviewed-by: Suanming Mou <mousuanming@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-11 12:23:44 +02:00
..
addr.c
addr.h
bcast.c
bcast.h
bearer.c
bearer.h
core.c tipc: fix modprobe tipc failed after switch order of device registration 2019-06-11 12:23:44 +02:00
core.h
discover.c
discover.h
eth_media.c
ib_media.c
Kconfig
link.c
link.h
Makefile
msg.c
msg.h
name_distr.c
name_distr.h
name_table.c
name_table.h
net.c
net.h
netlink.c
netlink.h
netlink_compat.c tipc: check link name with right length in tipc_nl_compat_link_set 2019-05-16 19:44:52 +02:00
node.c
node.h
server.c
server.h
socket.c
socket.h
subscr.c tipc: use destination length for copy string 2019-02-20 10:13:14 +01:00
subscr.h
sysctl.c
udp_media.c