Fail CRTC configuration if !vtSema

Unless we check for vtSema before calling into the CRTC and output callbacks,
we may end up trying to access video memory that no longer exists, leading to a
crash.  So if we don't have vtSema, return FALSE to the caller, indicating that
we didn't do anything.

Fixes #14444.
(cherry picked from commit bee2ddf35f)
This commit is contained in:
Jesse Barnes 2008-03-17 08:33:01 -07:00 committed by Adam Jackson
parent 727e22c830
commit 4f0755d6d4

View file

@ -717,6 +717,9 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
xf86CrtcPtr *save_crtcs;
Bool save_enabled = crtc->enabled;
if (!crtc->scrn->vtSema)
return FALSE;
save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr));
if ((randr_mode != NULL) != crtc->enabled)
changed = TRUE;