summaryrefslogtreecommitdiff
path: root/drivers/hv/connection.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2017-05-01 02:21:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-18 17:55:28 +0300
commit54a66265d6754b37fb4baf1d970ec88a6225a988 (patch)
tree308f05e5a3e1c693fc8c5952ec2ecc942baab42e /drivers/hv/connection.c
parent1e052a16eb2caf6727b594cad0744ccdfddf4254 (diff)
downloadlinux-54a66265d6754b37fb4baf1d970ec88a6225a988.tar.xz
Drivers: hv: vmbus: Fix rescind handling
Fix the rescind handling. This patch addresses the following rescind scenario that is currently not handled correctly: If a rescind were to be received while the offer is still being peocessed, we will be blocked indefinitely since the rescind message is handled on the same work element as the offer message. Fix this issue. I would like to thank Dexuan Cui <decui@microsoft.com> and Long Li <longli@microsoft.com> for working with me on this patch. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r--drivers/hv/connection.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index a938fcfe9bc9..c2d74ee95f60 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -93,10 +93,13 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
* all the CPUs. This is needed for kexec to work correctly where
* the CPU attempting to connect may not be CPU 0.
*/
- if (version >= VERSION_WIN8_1)
+ if (version >= VERSION_WIN8_1) {
msg->target_vcpu = hv_context.vp_index[smp_processor_id()];
- else
+ vmbus_connection.connect_cpu = smp_processor_id();
+ } else {
msg->target_vcpu = 0;
+ vmbus_connection.connect_cpu = 0;
+ }
/*
* Add to list before we send the request since we may