diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2016-06-09 17:08:56 -0700 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2017-06-20 14:04:48 +0200 |
commit | 0854b58f1f6c8d2540bffcbc1ed5b94f47b96a72 (patch) | |
tree | ef2a95e6c55f32321c0b4c91365b185e21c09142 | |
parent | 0c792ee191ef1297a37d9aadd3a4ffc6696d1429 (diff) | |
download | linux-stable-0854b58f1f6c8d2540bffcbc1ed5b94f47b96a72.tar.gz |
Drivers: hv: get rid of timeout in vmbus_open()
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@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r-- | drivers/hv/channel.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 90d6885b5825cf..50e6ba9548b411 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; newchannel->onchannel_callback = onchannelcallback; newchannel->channel_callback_context = context; @@ -204,11 +204,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) |