Staging: hv: Re-implement the synchronization for util channels
commitb9d8e35256251e6e6a27f5f190d4ec462be7f620
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 16 May 2011 13:44:36 +0000 (16 06:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 20:36:50 +0000 (17 13:36 -0700)
treee83b4ea2468402cabd7ba6d6e735ebc81caed2ab
parent31bceb845e0f5393db1d9bf033d365cff7132c93
Staging: hv: Re-implement the synchronization for util channels

The util module expects that the util channels are fully initialized
when the module loads. To deal with the race condition which can result
in a NULL pointer dereferencing if the util module were to load before
all the util channels are fully initialized, in commit:

commit: 8b5d6d3bd3e34e4cc67d875c8c88007c1c9aa96
Author: Haiyang Zhang <haiyangz@microsoft.com>
Date:   Fri May 28 23:22:44 2010 +000

code was introduced in the vmbus driver to ensure that all the
util channels were fully initialized before returning from the load
of the vmbus driver. This solution has several problems: if for whatever
reason, any util channel were to fail to initialize, vmbus driver would
wait indefinitely. We deal with this synchronization issue very differently
in this patch.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/hv_util.c