]> git.ipfire.org Git - thirdparty/qemu.git/commit
util/timer: avoid deadlock when shutting down
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 16 Sep 2024 08:53:56 +0000 (09:53 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 30 Sep 2024 20:07:38 +0000 (23:07 +0300)
commitbb630d92516cb39ee830566b5e0335a4e14b1cc6
tree23fb969c5ae11ebb00d844c5d58e636085ec1aaa
parent8fc8dd2efdedec96082777dc3065a389a9ecf5d9
util/timer: avoid deadlock when shutting down

When we shut down a guest we disable the timers. However this can
cause deadlock if the guest has queued some async work that is trying
to advance system time and spins forever trying to wind time forward.
Pay attention to the return code and bail early if we can't wind time
forward.

Reported-by: Elisha Hollander <just4now666666@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20240916085400.1046925-15-alex.bennee@linaro.org>
(cherry picked from commit bc02be4508d8753d1f6071b77d10f4661587df6f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
util/qemu-timer.c