diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-10-15 20:24:05 +0200 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-01-26 08:12:18 -0500 |
commit | 4fd3791cd4a36df6125a13fc9332ed3c9249cd2d (patch) | |
tree | eee9b7df20e8bd1998a88794e803afad4032bde7 /src/qxl_surface.c | |
parent | 3863e55263c6eff0fa7fbc544780c1cef5df9f0c (diff) |
Don't access the qxl device when our vt is not focussed
Trying to do so causes the X-server to segfault as it has
dropped iopl permission, which is, erm, undesirable :)
Diffstat (limited to 'src/qxl_surface.c')
-rw-r--r-- | src/qxl_surface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qxl_surface.c b/src/qxl_surface.c index 65d259a..e797fbb 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -202,7 +202,7 @@ push_surface_cmd (qxl_screen_t *qxl, struct qxl_surface_cmd *cmd) { struct qxl_command command; - if (!in_vga_mode (qxl)) + if (qxl->pScrn->vtSema) { command.type = QXL_CMD_SURFACE; command.data = physical_address (qxl, cmd, qxl->main_mem_slot); @@ -281,7 +281,7 @@ push_drawable (qxl_screen_t *qxl, struct qxl_drawable *drawable) * the next time a mode set set, an assertion in the * device will take down the entire virtual machine. */ - if (!in_vga_mode (qxl)) + if (qxl->pScrn->vtSema) { cmd.type = QXL_CMD_DRAW; cmd.data = physical_address (qxl, drawable, qxl->main_mem_slot); @@ -636,9 +636,13 @@ qxl_surface_prepare_access (qxl_surface_t *surface, int n_boxes; BoxPtr boxes; ScreenPtr pScreen = pixmap->drawable.pScreen; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; RegionRec new; int stride, height; + if (!pScrn->vtSema) + return FALSE; + REGION_INIT (NULL, &new, (BoxPtr)NULL, 0); REGION_SUBTRACT (NULL, &new, region, &surface->access_region); |