aboutsummaryrefslogtreecommitdiff
path: root/hw/qxl.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-04-25 12:13:19 +0300
committerGerd Hoffmann <kraxel@redhat.com>2012-05-03 10:45:04 +0200
commit47eddfbfe061dd18aad525863375028b1ee78d5c (patch)
tree824a8952e759c8817adb88c149945bcd3b088ae7 /hw/qxl.c
parentfae2afb10e3fdceab612c62a2b1e8b944ff578d9 (diff)
qxl: replace panic with guest bug in qxl_track_command
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qxl.c')
-rw-r--r--hw/qxl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/qxl.c b/hw/qxl.c
index b6a738eb17..8b66cbb31f 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -394,7 +394,11 @@ static int qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext)
return 1;
}
uint32_t id = le32_to_cpu(cmd->surface_id);
- PANIC_ON(id >= NUM_SURFACES);
+
+ if (id >= NUM_SURFACES) {
+ qxl_guest_bug(qxl, "QXL_CMD_SURFACE id %d >= %d", id, NUM_SURFACES);
+ return 1;
+ }
qemu_mutex_lock(&qxl->track_lock);
if (cmd->type == QXL_SURFACE_CMD_CREATE) {
qxl->guest_surfaces.cmds[id] = ext->cmd.data;