Commit 157c1df0 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Jiri Slaby

Drivers: hv: get rid of timeout in vmbus_open()

commit 396e287f 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: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent cf42508f
...@@ -114,7 +114,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, ...@@ -114,7 +114,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
struct vmbus_channel_msginfo *open_info = NULL; struct vmbus_channel_msginfo *open_info = NULL;
void *in, *out; void *in, *out;
unsigned long flags; unsigned long flags;
int ret, t, err = 0; int ret, err = 0;
spin_lock_irqsave(&newchannel->sc_lock, flags); spin_lock_irqsave(&newchannel->sc_lock, flags);
if (newchannel->state == CHANNEL_OPEN_STATE) { if (newchannel->state == CHANNEL_OPEN_STATE) {
...@@ -213,11 +213,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, ...@@ -213,11 +213,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
goto error1; goto error1;
} }
t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ); wait_for_completion(&open_info->waitevent);
if (t == 0) {
err = -ETIMEDOUT;
goto error1;
}
if (open_info->response.open_result.status) if (open_info->response.open_result.status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment