diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2013-08-28 17:56:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-30 15:08:04 -0400 |
commit | 666b9adc801ef012612c4e43e0f44b2cdc1979cf (patch) | |
tree | 62c2227012d203b502ab669237776f5ddb19709e /drivers/hv/connection.c | |
parent | e83736c80290b8b3139ce8615a3a49acec25fcc0 (diff) |
Drivers: hv: vmbus: Do not attempt to negoatiate a new version prematurely
The current code would attempt to negotiate a different protocol version if
the current negotiation timed out. This triggers an assert in the host (on debug
builds). Avoid this by negotiating a newer version only if the host properly
rejects the current version being negotiated.
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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index ec3b8cdf1e04..8f4743ab5fb2 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c | |||
@@ -195,7 +195,10 @@ int vmbus_connect(void) | |||
195 | 195 | ||
196 | do { | 196 | do { |
197 | ret = vmbus_negotiate_version(msginfo, version); | 197 | ret = vmbus_negotiate_version(msginfo, version); |
198 | if (ret == 0) | 198 | if (ret) |
199 | goto cleanup; | ||
200 | |||
201 | if (vmbus_connection.conn_state == CONNECTED) | ||
199 | break; | 202 | break; |
200 | 203 | ||
201 | version = vmbus_get_next_version(version); | 204 | version = vmbus_get_next_version(version); |