]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: hv: vmbus: Cleanup the code in process_chn_event()
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 31 Aug 2011 21:35:57 +0000 (14:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 18:53:51 +0000 (11:53 -0700)
commit63b24d1d898d93e03ed7e4e0b36e69465300e2d7
tree469b90d4fcf688873329652265e7fe719f2b63a8
parent554728f8d1ebf22720d1774141a775df5fa082a3
Staging: hv: vmbus: Cleanup the code in process_chn_event()

A channel in Hyper-V is equivalent to a device. Thus, a channel is
persistent once it is presented to the guest, even if the driver
managing this device is unloaded. By checking and invoking the driver
specific callback function under the protection of the channel
inbound_lock, we can properly deal with racing driver unloads since an
unloading driver sets the callback to NULL under the protection of this
inbound_lock.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/connection.c