From 1a96e3c1e7dbb466a8c93743b8f5ae37cc023766 Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Tue, 27 Feb 2018 12:52:03 +0300 Subject: replay: fix processing async events Asynchronous events saved at checkpoints may invoke callbacks when processed. These callbacks may also generate/read new events (e.g. clock reads). Therefore event processing flag must be reset before callback invocation. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini Message-Id: <20180227095203.1060.70831.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'replay/replay-events.c') diff --git a/replay/replay-events.c b/replay/replay-events.c index 94a6dcc..768b505 100644 --- a/replay/replay-events.c +++ b/replay/replay-events.c @@ -295,13 +295,13 @@ void replay_read_events(int checkpoint) if (!event) { break; } + replay_finish_event(); + read_event_kind = -1; replay_mutex_unlock(); replay_run_event(event); replay_mutex_lock(); g_free(event); - replay_finish_event(); - read_event_kind = -1; } } -- cgit v1.1