Return-Path: Received: from mail-pf0-f170.google.com ([209.85.192.170]:32936 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755308AbdDLRo2 (ORCPT ); Wed, 12 Apr 2017 13:44:28 -0400 Received: by mail-pf0-f170.google.com with SMTP id s16so17038186pfs.0 for ; Wed, 12 Apr 2017 10:44:28 -0700 (PDT) From: Sumit Semwal To: stable@vger.kernel.org Cc: Vitaly Kuznetsov , "K . Y . Srinivasan" , Greg Kroah-Hartman , Sumit Semwal Subject: [v2 PATCH for-4.4 09/16] Drivers: hv: get rid of timeout in vmbus_open() Date: Wed, 12 Apr 2017 23:13:43 +0530 Message-Id: <1492019030-13567-10-git-send-email-sumit.semwal@linaro.org> In-Reply-To: <1492019030-13567-1-git-send-email-sumit.semwal@linaro.org> References: <1492019030-13567-1-git-send-email-sumit.semwal@linaro.org> Sender: stable-owner@vger.kernel.org List-ID: From: Vitaly Kuznetsov [ Upstream commit 396e287fa2ff46e83ae016cdcb300c3faa3b02f6 ] 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 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sumit Semwal --- drivers/hv/channel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index ec61ad8..800598c 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); -- 2.7.4