xserver: Branch 'master'
Keith Packard
keithp at kemper.freedesktop.org
Fri Nov 1 02:36:41 CET 2013
hw/xfree86/common/xf86RandR.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
New commits:
commit 2aa5092b88174cb9988076ae96298217c97ad75f
Author: Egbert Eich <eich at freedesktop.org>
Date: Mon Aug 12 18:21:33 2013 +0200
DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched away
A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to
crash when xf86SetViewport() which does not check if the hardware is
accessible.
Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that.
Signed-off-by: Egbert Eich <eich at freedesktop.org>
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index 5606bee..2418731 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -214,13 +214,15 @@ xf86RandRSetMode(ScreenPtr pScreen,
*/
xf86ReconfigureLayout();
- /*
- * Make sure the whole screen is visible
- */
- xf86SetViewport(pScreen, pScreen->width, pScreen->height);
- xf86SetViewport(pScreen, 0, 0);
- if (pRoot && scrp->vtSema)
- (*scrp->EnableDisableFBAccess) (scrp, TRUE);
+ if (scrp->vtSema) {
+ /*
+ * Make sure the whole screen is visible
+ */
+ xf86SetViewport (pScreen, pScreen->width, pScreen->height);
+ xf86SetViewport (pScreen, 0, 0);
+ if (pRoot)
+ (*scrp->EnableDisableFBAccess) (scrp, TRUE);
+ }
return ret;
}
More information about the xorg-commit
mailing list