Skip to content

Commit

Permalink
Drivers: hv: vmbus: Do not attempt to negoatiate a new version premat…
Browse files Browse the repository at this point in the history
…urely

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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kattisrinivasan authored and gregkh committed Aug 30, 2013
1 parent e83736c commit 666b9ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ int vmbus_connect(void)

do {
ret = vmbus_negotiate_version(msginfo, version);
if (ret == 0)
if (ret)
goto cleanup;

if (vmbus_connection.conn_state == CONNECTED)
break;

version = vmbus_get_next_version(version);
Expand Down

0 comments on commit 666b9ad

Please sign in to comment.