X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fhv%2Fchannel_mgmt.c;h=1d44bb635bb8450eece2e5f655314475ce33f896;hb=00acc50506329bef3c28d11481730e6cda01a6a0;hp=591106cf58fc086c5a683da02ab8bd4204fbb069;hpb=23c2c8c6fa325939f95d840f54bfdec3cb76906c;p=linux-2.6-microblaze.git diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 591106cf58fc..1d44bb635bb8 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -731,7 +731,7 @@ static void vmbus_wait_for_unload(void) void *page_addr; struct hv_message *msg; struct vmbus_channel_message_header *hdr; - u32 message_type; + u32 message_type, i; /* * CHANNELMSG_UNLOAD_RESPONSE is always delivered to the CPU which was @@ -741,8 +741,11 @@ static void vmbus_wait_for_unload(void) * functional and vmbus_unload_response() will complete * vmbus_connection.unload_event. If not, the last thing we can do is * read message pages for all CPUs directly. + * + * Wait no more than 10 seconds so that the panic path can't get + * hung forever in case the response message isn't seen. */ - while (1) { + for (i = 0; i < 1000; i++) { if (completion_done(&vmbus_connection.unload_event)) break;