From: K. Y. Srinivasan Date: Wed, 28 Aug 2013 21:56:54 +0000 (-0700) Subject: Drivers: hv: vmbus: Do not attempt to negoatiate a new version prematurely X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=666b9adc801ef012612c4e43e0f44b2cdc1979cf;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Greg Kroah-Hartman --- 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) 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);