From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752368AbcFFM2P (ORCPT ); Mon, 6 Jun 2016 08:28:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40883 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309AbcFFM2M (ORCPT ); Mon, 6 Jun 2016 08:28:12 -0400 From: Vitaly Kuznetsov To: devel@linuxdriverproject.org Cc: linux-kernel@vger.kernel.org, Haiyang Zhang , "K. Y. Srinivasan" Subject: [PATCH v2] Drivers: hv: get rid of timeout in vmbus_open() Date: Mon, 6 Jun 2016 14:28:09 +0200 Message-Id: <1465216089-19415-1-git-send-email-vkuznets@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 06 Jun 2016 12:28:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- - The patch is the successor of previously sent '[PATCH] Drivers: hv: fix infinite wait when channel open timeouts, thus v2. - Remove the timeout completely [K. Y. Srinivasan] --- 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 6a8660d..e47d37d 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.5.5