Staging: hv: vmbus: Properly deal with de-registering channel callback
authorK. Y. Srinivasan <kys@microsoft.com>
Sat, 27 Aug 2011 18:31:33 +0000 (11:31 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Aug 2011 18:05:30 +0000 (11:05 -0700)
commitdad76bf73fc20b42d020fe5a93dbe4b4868e7681
treed1ce6dee63e86173b97f27796d515f31d9fdc03d
parent76c39d429d606d8f9b354ee2b1973b76c8331b1f
Staging: hv: vmbus: Properly deal with de-registering channel callback

Ensure that we correctly handle racing invocations of the channel callback
when the channel is being closed. We do this using the channel's inbound_lock.
A side-effect of this strategy is that we avoid repeatedly picking up this lock
as we drain the inbound ring-buffer.

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/channel.c
drivers/staging/hv/connection.c
drivers/staging/hv/netvsc.c
drivers/staging/hv/storvsc_drv.c