From: Emilio G. Cota Date: Mon, 3 Sep 2018 17:18:29 +0000 (-0400) Subject: cpus: initialize timers_state.vm_clock_lock X-Git-Tag: v3.1.0-rc0~71^2~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87a09cdc529ddb5daa660e3c442b793032a2169d;p=thirdparty%2Fqemu.git cpus: initialize timers_state.vm_clock_lock We forgot to initialize the spinlock introduced in 94377115b2 ("cpus: protect TimerState writes with a spinlock", 2018-08-23). Fix it. Signed-off-by: Emilio G. Cota Message-Id: <20180903171831.15446-5-cota@braap.org> Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- diff --git a/cpus.c b/cpus.c index 719788320f9..4abc3b3dda2 100644 --- a/cpus.c +++ b/cpus.c @@ -823,6 +823,7 @@ int cpu_throttle_get_percentage(void) void cpu_ticks_init(void) { seqlock_init(&timers_state.vm_clock_seqlock); + qemu_spin_init(&timers_state.vm_clock_lock); vmstate_register(NULL, 0, &vmstate_timers, &timers_state); throttle_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL_RT, cpu_throttle_timer_tick, NULL);