mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-14 15:02:54 +00:00
qxl: fix local renderer crash
Make sure we only ask the spice local renderer for display updates in
case we have a valid primary surface. Without that spice is confused
and throws errors in case a display update request (triggered by
screendump for example) happens in parallel to a mode switch and hits
the race window where the old primary surface is gone and the new isn't
establisted yet.
Cc: qemu-stable@nongnu.org
Fixes: https://bugzilla.redhat.com//show_bug.cgi?id=1567733
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180427115528.345-1-kraxel@redhat.com
(cherry picked from commit 5bd5c27c7d
)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
2dbaba7af0
commit
9ec09b6542
|
@ -169,7 +169,8 @@ void qxl_render_update(PCIQXLDevice *qxl)
|
|||
|
||||
qemu_mutex_lock(&qxl->ssd.lock);
|
||||
|
||||
if (!runstate_is_running() || !qxl->guest_primary.commands) {
|
||||
if (!runstate_is_running() || !qxl->guest_primary.commands ||
|
||||
qxl->mode == QXL_MODE_UNDEFINED) {
|
||||
qxl_render_update_area_unlocked(qxl);
|
||||
qemu_mutex_unlock(&qxl->ssd.lock);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue