diff options
author | Andrea Parri (Microsoft) <parri.andrea@gmail.com> | 2020-04-06 02:15:12 +0200 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2020-04-23 15:17:12 +0200 |
commit | d570aec0f2154e1bfba14ffd0df164a185e363b5 (patch) | |
tree | 1320751b4fc7a1b8cb1e0f794d535c030a59b6b1 /drivers/hv/channel.c | |
parent | Drivers: hv: vmbus: Remove the unused HV_LOCALIZED channel affinity logic (diff) | |
download | linux-d570aec0f2154e1bfba14ffd0df164a185e363b5.tar.xz linux-d570aec0f2154e1bfba14ffd0df164a185e363b5.zip |
Drivers: hv: vmbus: Synchronize init_vp_index() vs. CPU hotplug
init_vp_index() may access the cpu_online_mask mask via its calls of
cpumask_of_node(). Make sure to protect these accesses with a
cpus_read_lock() critical section.
Also, remove some (hardcoded) instances of CPU(0) from init_vp_index()
and replace them with VMBUS_CONNECT_CPU. The connect CPU can not go
offline, since Hyper-V does not provide a way to change it.
Finally, order the accesses of target_cpu from init_vp_index() and
hv_synic_cleanup() by relying on the channel_mutex; this is achieved
by moving the call of init_vp_index() into vmbus_process_offer().
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20200406001514.19876-10-parri.andrea@gmail.com
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv/channel.c')
0 files changed, 0 insertions, 0 deletions