aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/connection.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2011-03-21 09:41:37 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-05 00:33:25 -0400
commit22356585712d1ff08fbfed152edd8b386873b238 (patch)
treeaeb0a6192077d4865d06f6b35cdbf789b390ca99 /drivers/staging/hv/connection.c
parent75e4fb221babbe329c1aba8c34092d29034f1545 (diff)
staging: hv: use sync_bitops when interacting with the hypervisor
Locking is required when tweaking bits located in a shared page, use the sync_ version of bitops. Without this change vmbus_on_event() will miss events and as a result, vmbus_isr() will not schedule the receive tasklet. Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: stable <stable@kernel.org> Acked-by: Haiyang Zhang <haiyangz@microsoft.com> Acked-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/connection.c')
-rw-r--r--drivers/staging/hv/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/hv/connection.c b/drivers/staging/hv/connection.c
index 44b203b95a2..afc8116e7aa 100644
--- a/drivers/staging/hv/connection.c
+++ b/drivers/staging/hv/connection.c
@@ -296,7 +296,7 @@ void vmbus_on_event(unsigned long data)
296 for (dword = 0; dword < maxdword; dword++) { 296 for (dword = 0; dword < maxdword; dword++) {
297 if (recv_int_page[dword]) { 297 if (recv_int_page[dword]) {
298 for (bit = 0; bit < 32; bit++) { 298 for (bit = 0; bit < 32; bit++) {
299 if (test_and_clear_bit(bit, 299 if (sync_test_and_clear_bit(bit,
300 (unsigned long *) 300 (unsigned long *)
301 &recv_int_page[dword])) { 301 &recv_int_page[dword])) {
302 relid = (dword << 5) + bit; 302 relid = (dword << 5) + bit;
@@ -338,7 +338,7 @@ int vmbus_post_msg(void *buffer, size_t buflen)
338int vmbus_set_event(u32 child_relid) 338int vmbus_set_event(u32 child_relid)
339{ 339{
340 /* Each u32 represents 32 channels */ 340 /* Each u32 represents 32 channels */
341 set_bit(child_relid & 31, 341 sync_set_bit(child_relid & 31,
342 (unsigned long *)vmbus_connection.send_int_page + 342 (unsigned long *)vmbus_connection.send_int_page +
343 (child_relid >> 5)); 343 (child_relid >> 5));
344 344