From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzVjm-0003ak-Q2 for qemu-devel@nongnu.org; Mon, 10 Sep 2018 19:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzVbe-0005Sw-9P for qemu-devel@nongnu.org; Mon, 10 Sep 2018 19:28:38 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44251) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzVbe-0005Ic-1o for qemu-devel@nongnu.org; Mon, 10 Sep 2018 19:28:34 -0400 From: "Emilio G. Cota" Date: Mon, 10 Sep 2018 19:27:47 -0400 Message-Id: <20180910232752.31565-8-cota@braap.org> In-Reply-To: <20180910232752.31565-1-cota@braap.org> References: <20180910232752.31565-1-cota@braap.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v2 07/12] cpus: initialize timers_state.vm_clock_lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Murilo Opsfelder Araujo We forgot to initialize the spinlock introduced in 94377115b2 ("cpus: protect TimerState writes with a spinlock", 2018-08-23). Fix it. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpus.c b/cpus.c index 8ee6e5db93..ebc13bac2d 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); -- 2.17.1