summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2014-08-27 16:25:34 -0700
committerBen Hutchings <ben@decadent.org.uk>2014-12-14 16:23:43 +0000
commitbb076b385c7b50629136b8dc0300282c45d670da (patch)
tree92e68857fcb0e6d1bbe94a7402b75de3a442dc5f
parent9e16dbba1cfe498d5029f664569227496a7b9fce (diff)
downloadlinux-stable-bb076b385c7b50629136b8dc0300282c45d670da.tar.gz
linux-stable-bb076b385c7b50629136b8dc0300282c45d670da.tar.bz2
linux-stable-bb076b385c7b50629136b8dc0300282c45d670da.zip
Drivers: hv: vmbus: Cleanup vmbus_establish_gpadl()
commit 72c6b71c245dac8f371167d97ef471b367d0b66b upstream. Eliminate the call to BUG_ON() by waiting for the host to respond. We are trying to reclaim the ownership of memory that was given to the host and so we will have to wait until the host responds. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/hv/channel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index fa590900d2cb..1211d389d592 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -400,7 +400,6 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
u32 next_gpadl_handle;
unsigned long flags;
int ret = 0;
- int t;
next_gpadl_handle = atomic_read(&vmbus_connection.next_gpadl_handle);
atomic_inc(&vmbus_connection.next_gpadl_handle);
@@ -447,9 +446,7 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
}
}
- t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ);
- BUG_ON(t == 0);
-
+ wait_for_completion(&msginfo->waitevent);
/* At this point, we received the gpadl created msg */
*gpadl_handle = gpadlmsg->gpadl;