From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412AbcFIW1H (ORCPT ); Thu, 9 Jun 2016 18:27:07 -0400 Received: from p3plsmtps2ded04.prod.phx3.secureserver.net ([208.109.80.198]:45032 "EHLO p3plsmtps2ded04.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbcFIW1E (ORCPT ); Thu, 9 Jun 2016 18:27:04 -0400 x-originating-ip: 72.167.245.219 From: "K. Y. Srinivasan" To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com Cc: "K. Y. Srinivasan" Subject: [PATCH 1/2] Drivers: hv: get rid of timeout in vmbus_open() Date: Thu, 9 Jun 2016 17:08:56 -0700 Message-Id: <1465517337-19521-1-git-send-email-kys@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1465517312-19482-1-git-send-email-kys@microsoft.com> References: <1465517312-19482-1-git-send-email-kys@microsoft.com> X-CMAE-Envelope: MS4wfKjRpFc1WUhno+VusD5qTlRPiCZVRs2zk0oxQlN2UBllm853gNh9yLkY70evu89eWNPmAbNcle6sQclmG5B5nXLF4UeXJhIt3RsV1KZXfp47+c+WwSTV NFRo0Q0T91hr4kOYFGz1Su0usDOsAq8IuMnhilh2zQH/Ap70ZFrWtf5T+9q35pIQCuJwaxQcS5Hyb6PFL10XPh0fzPYWag19zBxvzMsagdrxIGeHs7ljEOu6 gSxCA4DeGpXgLMEIkkQu7g9mE6QZoQoJgviF6hsObvEZEQGjSnI+4QOX7JJuZdVppEIZ/zUwv68lby+nhzGCvNX1sF0H3jb7+X98KK99FvnxU03M+EBAHddI y7ZMcDYn2FmXuuTSCWjTiLJze38M32q9Qd/dEwRHq9JNiQs0yuJ9+upMv2BgA2NXddXYTyL2tli6NrJqBrV0s742/XxwiSCWF/sYkvLYVWsJTNmQtJg= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vitaly Kuznetsov vmbus_teardown_gpadl() can result in infinite wait when it is called on 5 second timeout in vmbus_open(). The issue is caused by the fact that gpadl teardown operation won't ever succeed for an opened channel and the timeout isn't always enough. As a guest, we can always trust the host to respond to our request (and there is nothing we can do if it doesn't). Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index a68830c..9a88c63 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -73,7 +73,6 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, void *in, *out; unsigned long flags; int ret, err = 0; - unsigned long t; struct page *page; spin_lock_irqsave(&newchannel->lock, flags); @@ -183,11 +182,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, goto error1; } - t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ); - if (t == 0) { - err = -ETIMEDOUT; - goto error1; - } + wait_for_completion(&open_info->waitevent); spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); list_del(&open_info->msglistentry); -- 1.7.4.1