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 | |
| 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')
| -rw-r--r-- | net/tipc/Kconfig | 1 | ||||
| -rw-r--r-- | net/tipc/core.c | 32 | ||||
| -rw-r--r-- | net/tipc/subscr.h | 5 | ||||
| -rw-r--r-- | net/tipc/topsrv.c | 14 |
4 files changed, 35 insertions, 17 deletions
diff --git a/net/tipc/Kconfig b/net/tipc/Kconfig index e450212121d2..b93bb7bdb04a 100644 --- a/net/tipc/Kconfig +++ b/net/tipc/Kconfig | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 1 | # | 2 | # |
| 2 | # TIPC configuration | 3 | # TIPC configuration |
| 3 | # | 4 | # |
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"); |
diff --git a/net/tipc/subscr.h b/net/tipc/subscr.h index d793b4343885..aa015c233898 100644 --- a/net/tipc/subscr.h +++ b/net/tipc/subscr.h | |||
| @@ -77,8 +77,9 @@ void tipc_sub_report_overlap(struct tipc_subscription *sub, | |||
| 77 | u32 found_lower, u32 found_upper, | 77 | u32 found_lower, u32 found_upper, |
| 78 | u32 event, u32 port, u32 node, | 78 | u32 event, u32 port, u32 node, |
| 79 | u32 scope, int must); | 79 | u32 scope, int must); |
| 80 | int tipc_topsrv_start(struct net *net); | 80 | |
| 81 | void tipc_topsrv_stop(struct net *net); | 81 | int __net_init tipc_topsrv_init_net(struct net *net); |
| 82 | void __net_exit tipc_topsrv_exit_net(struct net *net); | ||
| 82 | 83 | ||
| 83 | void tipc_sub_put(struct tipc_subscription *subscription); | 84 | void tipc_sub_put(struct tipc_subscription *subscription); |
| 84 | void tipc_sub_get(struct tipc_subscription *subscription); | 85 | void tipc_sub_get(struct tipc_subscription *subscription); |
diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index b45932d78004..f345662890a6 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c | |||
| @@ -635,7 +635,7 @@ static void tipc_topsrv_work_stop(struct tipc_topsrv *s) | |||
| 635 | destroy_workqueue(s->send_wq); | 635 | destroy_workqueue(s->send_wq); |
| 636 | } | 636 | } |
| 637 | 637 | ||
| 638 | int tipc_topsrv_start(struct net *net) | 638 | static int tipc_topsrv_start(struct net *net) |
| 639 | { | 639 | { |
| 640 | struct tipc_net *tn = tipc_net(net); | 640 | struct tipc_net *tn = tipc_net(net); |
| 641 | const char name[] = "topology_server"; | 641 | const char name[] = "topology_server"; |
| @@ -668,7 +668,7 @@ int tipc_topsrv_start(struct net *net) | |||
| 668 | return ret; | 668 | return ret; |
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | void tipc_topsrv_stop(struct net *net) | 671 | static void tipc_topsrv_stop(struct net *net) |
| 672 | { | 672 | { |
| 673 | struct tipc_topsrv *srv = tipc_topsrv(net); | 673 | struct tipc_topsrv *srv = tipc_topsrv(net); |
| 674 | struct socket *lsock = srv->listener; | 674 | struct socket *lsock = srv->listener; |
| @@ -693,3 +693,13 @@ void tipc_topsrv_stop(struct net *net) | |||
| 693 | idr_destroy(&srv->conn_idr); | 693 | idr_destroy(&srv->conn_idr); |
| 694 | kfree(srv); | 694 | kfree(srv); |
| 695 | } | 695 | } |
| 696 | |||
| 697 | int __net_init tipc_topsrv_init_net(struct net *net) | ||
| 698 | { | ||
| 699 | return tipc_topsrv_start(net); | ||
| 700 | } | ||
| 701 | |||
| 702 | void __net_exit tipc_topsrv_exit_net(struct net *net) | ||
| 703 | { | ||
| 704 | tipc_topsrv_stop(net); | ||
| 705 | } | ||
