From patchwork Thu Apr 20 07:38:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Semwal X-Patchwork-Id: 97716 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp667479qgf; Thu, 20 Apr 2017 00:39:22 -0700 (PDT) X-Received: by 10.84.224.12 with SMTP id r12mr8551212plj.69.1492673962640; Thu, 20 Apr 2017 00:39:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 203si1845905pgf.183.2017.04.20.00.39.22; Thu, 20 Apr 2017 00:39:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S943102AbdDTHjI (ORCPT + 6 others); Thu, 20 Apr 2017 03:39:08 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:33442 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943086AbdDTHjA (ORCPT ); Thu, 20 Apr 2017 03:39:00 -0400 Received: by mail-oi0-f43.google.com with SMTP id y11so6726561oie.0 for ; Thu, 20 Apr 2017 00:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VUlTazfLwAtNvLnPpISqIODlyCBz04IQqWWvZXzyq+U=; b=a3ujJMmu9v+oiQ8gDvpPZdYa8U1Qaymby39syuaFf4d5DxV8cJ2Vi+jquMBW8Ettql UL0XClxv2SmnsvvkShUGuhAv64LKzG8EKmcyNJgJ44UQBZ3oyKDPMZIBZOlMGbDEZXl2 v559d3sDoDh6tvNMcy8Xc34jLVnaX0KceepKY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VUlTazfLwAtNvLnPpISqIODlyCBz04IQqWWvZXzyq+U=; b=LDnpoklasY+/rmAfz0JDuIHaCzrQrUusSVzh5gwjJiVNXIbEu0f0Mcd1qk5CQbNYw9 bvVDPloC2nC7nFzf52ex/cQ32EXYF+/tR50mZTHG1blLOcS/ZAkUHhC/r6dUDoXaBnXr eqzYRIXTx6huxNhkujDsBC2PnpZwxa+6i4aiiEf1fgqB7B7BOTlBGlQTX4s8LXH2taaI rqQu5RX1Yz1BAAvuJC5R2ECAKHLXViPgDfek6FDpiD+1mtciETnISYlW7X5Ltb5IiRMl j8X5bkFpcnivMSC5FxcpNfYLJkDwHGqLnQlMuCpyjU1X35TxS6ZfrUZH8pSjBIr/N74T Y9bA== X-Gm-Message-State: AN3rC/5NTeyZ5nqRyASpjnbwIcLotFRZy74SI2qwI1qNyjGvZ0TVpxyq Fde8+QWrvdPKC5Sd X-Received: by 10.84.229.3 with SMTP id b3mr8719384plk.190.1492673939337; Thu, 20 Apr 2017 00:38:59 -0700 (PDT) Received: from phantom.lan ([106.51.225.38]) by smtp.gmail.com with ESMTPSA id t2sm8497717pfl.34.2017.04.20.00.38.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Apr 2017 00:38:58 -0700 (PDT) From: Sumit Semwal To: stable@vger.kernel.org Cc: Vitaly Kuznetsov , "K . Y . Srinivasan" , Greg Kroah-Hartman , Sumit Semwal Subject: [v3 PATCH for-4.4 2/7] Drivers: hv: get rid of timeout in vmbus_open() Date: Thu, 20 Apr 2017 13:08:38 +0530 Message-Id: <1492673923-1352-3-git-send-email-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492673923-1352-1-git-send-email-sumit.semwal@linaro.org> References: <1492673923-1352-1-git-send-email-sumit.semwal@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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(-) -- 2.7.4 diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 49d2449..d037454 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);