Drivers: hv: Fix a bug in get_vp_index()
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 17 May 2013 16:30:35 +0000 (09:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 16:56:55 +0000 (09:56 -0700)
Linux' notion of cpuid is different from the Host's notion of CPUID. In the
call to bind the channel interrupts, we should use the host's notion of
CPU Ids. Fix this bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: Stable <stable@vger.kernel.org> (V3.9)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel_mgmt.c

index bad8128b283a8752a11e1c3a13d02c83bb1df07b..21ef68934a20bba366c1ea1c5be9705f0fafe6fa 100644 (file)
@@ -329,7 +329,7 @@ static u32 get_vp_index(uuid_le *type_guid)
                return 0;
        }
        cur_cpu = (++next_vp % max_cpus);
-       return cur_cpu;
+       return hv_context.vp_index[cur_cpu];
 }
 
 /*