aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>2014-10-16 17:02:15 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2014-10-23 16:24:02 +0100
commit3251f20b897f955ab7f153181b4ebfbb2317cbb9 (patch)
treec08c297c9d1d03dc915b567a9788e77523555143 /arch
parentx86/xen: avoid race in p2m handling (diff)
downloadlinux-dev-3251f20b897f955ab7f153181b4ebfbb2317cbb9.tar.xz
linux-dev-3251f20b897f955ab7f153181b4ebfbb2317cbb9.zip
x86/xen: Fix incorrect per_cpu accessor in xen_clocksource_read()
Commit 89cbc76768c2 ("x86: Replace __get_cpu_var uses") replaced __get_cpu_var() with this_cpu_ptr() in xen_clocksource_read() in such a way that instead of accessing a structure pointed to by a per-cpu pointer we are trying to get to a per-cpu structure. __this_cpu_read() of the pointer is the more appropriate accessor. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index a1d430b112b3..f473d268d387 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -158,7 +158,7 @@ cycle_t xen_clocksource_read(void)
cycle_t ret;
preempt_disable_notrace();
- src = this_cpu_ptr(&xen_vcpu->time);
+ src = &__this_cpu_read(xen_vcpu)->time;
ret = pvclock_clocksource_read(src);
preempt_enable_notrace();
return ret;