From: K. Y. Srinivasan Date: Fri, 17 May 2013 16:30:35 +0000 (-0700) Subject: Drivers: hv: Fix a bug in get_vp_index() X-Git-Tag: v3.9.5~97 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3343e275c00997a0c68485434f149302830a2583;p=users%2Fdwmw2%2Flinux.git Drivers: hv: Fix a bug in get_vp_index() commit d2242a384355773c711a936522bcfae0f35f8c2a upstream. 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index ff1be167eb040..421d6078d8151 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -318,7 +318,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]; } /*