diff options
author | Andrea Parri (Microsoft) <parri.andrea@gmail.com> | 2020-06-17 19:46:39 +0300 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2020-06-19 18:38:26 +0300 |
commit | 3eb0ac869c66d73a034004b97b3a4abe1c5cb998 (patch) | |
tree | 0ae6c8ec7eb477178ed0c43f5ecf26a8046f4a0a /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 12d0dd8e728e785e6fb81f5232280678bc69d8dc (diff) | |
download | linux-3eb0ac869c66d73a034004b97b3a4abe1c5cb998.tar.xz |
Drivers: hv: vmbus: Use channel_mutex in channel_vp_mapping_show()
The primitive currently uses channel->lock to protect the loop over
sc_list w.r.t. list additions/deletions but it doesn't protect the
target_cpu(s) loads w.r.t. a concurrent target_cpu_store(): while the
data races on target_cpu are hardly of any concern here, replace the
channel->lock critical section with a channel_mutex critical section
and extend the latter to include the loads of target_cpu; this same
pattern is also used in hv_synic_cleanup().
Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20200617164642.37393-6-parri.andrea@gmail.com
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions