diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2019-05-31 18:48:45 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-05-31 18:48:45 -0400 |
| commit | 24e8a2ca1f74574ad2ed1ac7af0260dd90fd911e (patch) | |
| tree | c863dd43c84579d853f3a2ae0ee6ead46c967703 /net/tipc/core.c | |
| parent | 66f61c92889ff3ca365161fb29dd36d6354682ba (diff) | |
| parent | d724c9e54939a597592de3659541da11fc7aa112 (diff) | |
Merge tag 'kvm-ppc-fixes-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master
PPC KVM fixes for 5.2
- Several bug fixes for the new XIVE-native code.
- Replace kvm->lock by other mutexes in several places where we hold a
vcpu mutex, to avoid lock order inversions.
- Fix a lockdep warning on guest entry for radix-mode guests.
- Fix a bug causing user-visible corruption of SPRG3 on the host.
Diffstat (limited to 'net/tipc/core.c')
| -rw-r--r-- | net/tipc/core.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c index 27cccd101ef6..ed536c05252a 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c | |||
| @@ -77,9 +77,6 @@ static int __net_init tipc_init_net(struct net *net) | |||
| 77 | goto out_nametbl; | 77 | goto out_nametbl; |
| 78 | 78 | ||
| 79 | INIT_LIST_HEAD(&tn->dist_queue); | 79 | INIT_LIST_HEAD(&tn->dist_queue); |
| 80 | err = tipc_topsrv_start(net); | ||
| 81 | if (err) | ||
| 82 | goto out_subscr; | ||
| 83 | 80 | ||
| 84 | err = tipc_bcast_init(net); | 81 | err = tipc_bcast_init(net); |
| 85 | if (err) | 82 | if (err) |
| @@ -88,8 +85,6 @@ static int __net_init tipc_init_net(struct net *net) | |||
| 88 | return 0; | 85 | return 0; |
| 89 | 86 | ||
| 90 | out_bclink: | 87 | out_bclink: |
| 91 | tipc_bcast_stop(net); | ||
| 92 | out_subscr: | ||
| 93 | tipc_nametbl_stop(net); | 88 | tipc_nametbl_stop(net); |
| 94 | out_nametbl: | 89 | out_nametbl: |
| 95 | tipc_sk_rht_destroy(net); | 90 | tipc_sk_rht_destroy(net); |
| @@ -99,7 +94,6 @@ out_sk_rht: | |||
| 99 | 94 | ||
| 100 | static void __net_exit tipc_exit_net(struct net *net) | 95 | static void __net_exit tipc_exit_net(struct net *net) |
| 101 | { | 96 | { |
| 102 | tipc_topsrv_stop(net); | ||
| 103 | tipc_net_stop(net); | 97 | tipc_net_stop(net); |
| 104 | tipc_bcast_stop(net); | 98 | tipc_bcast_stop(net); |
| 105 | tipc_nametbl_stop(net); | 99 | tipc_nametbl_stop(net); |
| @@ -113,6 +107,11 @@ static struct pernet_operations tipc_net_ops = { | |||
| 113 | .size = sizeof(struct tipc_net), | 107 | .size = sizeof(struct tipc_net), |
| 114 | }; | 108 | }; |
| 115 | 109 | ||
| 110 | static struct pernet_operations tipc_topsrv_net_ops = { | ||
| 111 | .init = tipc_topsrv_init_net, | ||
| 112 | .exit = tipc_topsrv_exit_net, | ||
| 113 | }; | ||
| 114 | |||
| 116 | static int __init tipc_init(void) | 115 | static int __init tipc_init(void) |
| 117 | { | 116 | { |
| 118 | int err; | 117 | int err; |
| @@ -131,10 +130,6 @@ static int __init tipc_init(void) | |||
| 131 | if (err) | 130 | if (err) |
| 132 | goto out_netlink_compat; | 131 | goto out_netlink_compat; |
| 133 | 132 | ||
| 134 | err = tipc_socket_init(); | ||
| 135 | if (err) | ||
| 136 | goto out_socket; | ||
| 137 | |||
| 138 | err = tipc_register_sysctl(); | 133 | err = tipc_register_sysctl(); |
| 139 | if (err) | 134 | if (err) |
| 140 | goto out_sysctl; | 135 | goto out_sysctl; |
| @@ -143,6 +138,14 @@ static int __init tipc_init(void) | |||
| 143 | if (err) | 138 | if (err) |
| 144 | goto out_pernet; | 139 | goto out_pernet; |
| 145 | 140 | ||
| 141 | err = tipc_socket_init(); | ||
| 142 | if (err) | ||
| 143 | goto out_socket; | ||
| 144 | |||
| 145 | err = register_pernet_subsys(&tipc_topsrv_net_ops); | ||
| 146 | if (err) | ||
| 147 | goto out_pernet_topsrv; | ||
| 148 | |||
| 146 | err = tipc_bearer_setup(); | 149 | err = tipc_bearer_setup(); |
| 147 | if (err) | 150 | if (err) |
| 148 | goto out_bearer; | 151 | goto out_bearer; |
| @@ -150,12 +153,14 @@ static int __init tipc_init(void) | |||
| 150 | pr_info("Started in single node mode\n"); | 153 | pr_info("Started in single node mode\n"); |
| 151 | return 0; | 154 | return 0; |
| 152 | out_bearer: | 155 | out_bearer: |
| 156 | unregister_pernet_subsys(&tipc_topsrv_net_ops); | ||
| 157 | out_pernet_topsrv: | ||
| 158 | tipc_socket_stop(); | ||
| 159 | out_socket: | ||
| 153 | unregister_pernet_subsys(&tipc_net_ops); | 160 | unregister_pernet_subsys(&tipc_net_ops); |
| 154 | out_pernet: | 161 | out_pernet: |
| 155 | tipc_unregister_sysctl(); | 162 | tipc_unregister_sysctl(); |
| 156 | out_sysctl: | 163 | out_sysctl: |
| 157 | tipc_socket_stop(); | ||
| 158 | out_socket: | ||
| 159 | tipc_netlink_compat_stop(); | 164 | tipc_netlink_compat_stop(); |
| 160 | out_netlink_compat: | 165 | out_netlink_compat: |
| 161 | tipc_netlink_stop(); | 166 | tipc_netlink_stop(); |
| @@ -167,10 +172,11 @@ out_netlink: | |||
| 167 | static void __exit tipc_exit(void) | 172 | static void __exit tipc_exit(void) |
| 168 | { | 173 | { |
| 169 | tipc_bearer_cleanup(); | 174 | tipc_bearer_cleanup(); |
| 175 | unregister_pernet_subsys(&tipc_topsrv_net_ops); | ||
| 176 | tipc_socket_stop(); | ||
| 170 | unregister_pernet_subsys(&tipc_net_ops); | 177 | unregister_pernet_subsys(&tipc_net_ops); |
| 171 | tipc_netlink_stop(); | 178 | tipc_netlink_stop(); |
| 172 | tipc_netlink_compat_stop(); | 179 | tipc_netlink_compat_stop(); |
| 173 | tipc_socket_stop(); | ||
| 174 | tipc_unregister_sysctl(); | 180 | tipc_unregister_sysctl(); |
| 175 | 181 | ||
| 176 | pr_info("Deactivated\n"); | 182 | pr_info("Deactivated\n"); |
