[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.12] x86/vpt: fix build with old gcc



commit 8145d38b48009255a32ab87a02e481cd09c811f9
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Dec 1 15:48:08 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Dec 1 15:48:08 2020 +0100

    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 <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: f2c620aa062767b318267d678ae249dcb637b870
    master date: 2020-11-18 12:38:01 +0100
---
 xen/arch/x86/hvm/vpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index 77b142406f..6d5f98767c 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -400,7 +400,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. */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.12



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.