summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/connection.c
diff options
context:
space:
mode:
authorOlaf Hering2011-03-21 14:41:37 +0100
committerGreg Kroah-Hartman2011-04-05 06:33:25 +0200
commit22356585712d1ff08fbfed152edd8b386873b238 (patch)
treeaeb0a6192077d4865d06f6b35cdbf789b390ca99 /drivers/staging/hv/connection.c
parentstaging: hv: fix reversed memset arguments in hv_mouse (diff)
downloadkernel-qcow2-linux-22356585712d1ff08fbfed152edd8b386873b238.tar.gz
kernel-qcow2-linux-22356585712d1ff08fbfed152edd8b386873b238.tar.xz
kernel-qcow2-linux-22356585712d1ff08fbfed152edd8b386873b238.zip
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 44b203b95a22..afc8116e7aa4 100644
--- a/drivers/staging/hv/connection.c
+++ b/drivers/staging/hv/connection.c
@@ -296,7 +296,7 @@ void vmbus_on_event(unsigned long data)
for (dword = 0; dword < maxdword; dword++) {
if (recv_int_page[dword]) {
for (bit = 0; bit < 32; bit++) {
- if (test_and_clear_bit(bit,
+ if (sync_test_and_clear_bit(bit,
(unsigned long *)
&recv_int_page[dword])) {
relid = (dword << 5) + bit;
@@ -338,7 +338,7 @@ int vmbus_post_msg(void *buffer, size_t buflen)
int vmbus_set_event(u32 child_relid)
{
/* Each u32 represents 32 channels */
- set_bit(child_relid & 31,
+ sync_set_bit(child_relid & 31,
(unsigned long *)vmbus_connection.send_int_page +
(child_relid >> 5));