From: Jan Beulich Date: Tue, 1 Dec 2020 14:32:51 +0000 (+0100) Subject: x86/vpt: fix build with old gcc X-Git-Tag: archive/raspbian/4.14.0+88-g1d1d1f5391-2+rpi1^2~86^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7c6ee4ee232d2e7b2db1981aa7b9f578a2b0f0ad;p=xen.git x86/vpt: fix build with old gcc I believe it was the XSA-336 fix (42fcdd42328f "x86/vpt: fix race when migrating timers between vCPUs") which has unmasked a bogus uninitialized variable warning. This is observable with gcc 4.3.4, but only on 4.13 and older; it's hidden on newer versions apparently due to the addition to _read_unlock() done by 12509bbeb9e3 ("rwlocks: call preempt_disable() when taking a rwlock"). Signed-off-by: Jan Beulich Acked-by: Andrew Cooper master commit: f2c620aa062767b318267d678ae249dcb637b870 master date: 2020-11-18 12:38:01 +0100 --- diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index d64467b631..ae7f715620 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -401,7 +401,7 @@ int pt_update_irq(struct vcpu *v) * associated with the timer. */ time_cb *cb = NULL; - void *cb_priv; + void *cb_priv = NULL; pt_vcpu_lock(v); /* Make sure the timer is still on the list. */