[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b6b633a944f65a78acc42c9634dc60af4d07d903.1493888632.git.jslaby@suse.cz>
Date: Thu, 4 May 2017 11:04:19 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"K . Y . Srinivasan" <kys@...rosoft.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 54/86] Drivers: hv: get rid of timeout in vmbus_open()
From: Vitaly Kuznetsov <vkuznets@...hat.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 396e287fa2ff46e83ae016cdcb300c3faa3b02f6 upstream.
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 <vkuznets@...hat.com>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Signed-off-by: Sumit Semwal <sumit.semwal@...aro.org>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/hv/channel.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 8cddbd10dadb..6f1731573097 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -114,7 +114,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
struct vmbus_channel_msginfo *open_info = NULL;
void *in, *out;
unsigned long flags;
- int ret, t, err = 0;
+ int ret, err = 0;
spin_lock_irqsave(&newchannel->sc_lock, flags);
if (newchannel->state == CHANNEL_OPEN_STATE) {
@@ -213,11 +213,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);
if (open_info->response.open_result.status)
--
2.12.2
Powered by blists - more mailing lists