[PATCH] fix xserver crash when configuring TV Out on intel driver

rglowery at exemail.com.au rglowery at exemail.com.au
Wed Oct 24 04:15:35 PDT 2007


I believe I have found the cause of the xserver crash when running "xrandr
--output TV --set TV_FORMAT 576p --auto" while no other output devices are
connected.

The issue is that i830_tv_get_modes() is leaving the DisplayModeRec prev
pointer uninitialised which is confusing xf86DeleteMode()

Patch below appears to fix the problem, however looking at the comments in
xf86DeleteMode(), it is supposed to support a singly linked list, but the
implementation obviously does not.

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 940250e..d96a501 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1451,6 +1451,9 @@ i830_tv_get_modes(xf86OutputPtr output)

        mode_ptr->type = M_T_DRIVER;
        mode_ptr->next = ret;
+       mode_ptr->prev = NULL;
+       if (ret)
+           ret->prev = mode_ptr;
        ret = mode_ptr;
     }





More information about the xorg mailing list