android_kernel_xiaomi_sm7250/net/tipc
Junwei Hu 4b90007778 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-05-25 18:23:22 +02:00
..
addr.c
addr.h
bcast.c tipc: correct spelling errors for struct tipc_bc_base's comment 2018-09-03 22:03:07 -07:00
bcast.h
bearer.c tipc: fix a double free in tipc_enable_bearer() 2019-01-09 17:38:34 +01:00
bearer.h
core.c tipc: fix modprobe tipc failed after switch order of device registration 2019-05-25 18:23:22 +02:00
core.h
diag.c tipc: switch to rhashtable iterator 2018-08-29 18:04:54 -07:00
discover.c tipc: fix lockdep warning when reinitilaizing sockets 2018-11-23 08:17:03 +01:00
discover.h
eth_media.c
group.c tipc: fix info leak from kernel tipc_event 2018-10-18 16:49:53 -07:00
group.h
ib_media.c
Kconfig
link.c tipc: fix link re-establish failure 2018-11-23 08:17:04 +01:00
link.h tipc: fix failover problem 2018-09-29 11:45:14 -07:00
Makefile
monitor.c
monitor.h
msg.c
msg.h
name_distr.c tipc: fix unsafe rcu locking when accessing publication list 2018-10-15 22:33:27 -07:00
name_distr.h
name_table.c tipc: missing entries in name table of publications 2019-04-27 09:36:31 +02:00
name_table.h
net.c tipc: change to check tipc_own_id to return in tipc_net_stop 2019-04-03 06:26:18 +02:00
net.h tipc: fix lockdep warning when reinitilaizing sockets 2018-11-23 08:17:03 +01:00
netlink_compat.c tipc: check link name with right length in tipc_nl_compat_link_set 2019-05-02 09:58:57 +02:00
netlink.c tipc: switch to rhashtable iterator 2018-08-29 18:04:54 -07:00
netlink.h
node.c tipc: fix node keep alive interval calculation 2019-02-12 19:47:06 +01:00
node.h
socket.c tipc: fix hanging clients using poll with EPOLLOUT flag 2019-05-16 19:41:31 +02:00
socket.h tipc: call start and done ops directly in __tipc_nl_compat_dumpit() 2018-09-06 21:49:18 -07:00
subscr.c
subscr.h
sysctl.c
topsrv.c tipc: fix cancellation of topology subscriptions 2019-04-03 06:26:18 +02:00
topsrv.h
udp_media.c tipc: fix a double kfree_skb() 2019-01-09 17:38:34 +01:00
udp_media.h