xserver/hw/xfree86/drivers/modesetting
Tobias Klausmann 1c002bc434 modesetting/drmmode: add NULL pointer check in drmmode_output_dpms
drmmode_output_dpms is called especially with !output->crtc found in
xf86DisableUnusedFunctions so we have to guard for it, else the server
segfaults:

0  0x00007fdc1706054b in drmmode_output_dpms (output=0x55e15243c210, mode=3) at
drmmode_display.c:2243
1  0x000055e1500b6873 in xf86DisableUnusedFunctions (pScrn=0x55e152133f00) at
xf86Crtc.c:3021
2  0x000055e1500be940 in xf86RandR12CrtcSet (pScreen=<optimized out>,
randr_crtc=0x55e1524b2b90, randr_mode=0x0, x=0, y=0, rotation=<optimized out>,
num_randr_outputs=0, randr_outputs=0x0) at xf86RandR12.c:1244
3  0x000055e1500fa1c2 in RRCrtcSet (crtc=<optimized out>, mode=0x0, x=0, y=0,
rotation=rotation@entry=1, numOutputs=numOutputs@entry=0, outputs=0x0) at
rrcrtc.c:763
4  0x000055e1500fba9e in ProcRRSetCrtcConfig (client=0x55e152bfae50) at
rrcrtc.c:1390
5  0x000055e150044008 in Dispatch () at dispatch.c:478
6  0x000055e150047ff8 in dix_main (argc=13, argv=0x7ffc68561038,
envp=<optimized out>) at main.c:276
7  0x00007fdc1a0c6a87 in __libc_start_main () at /lib64/libc.so.6
8  0x000055e150031d0a in _start () at ../sysdeps/x86_64/start.S:120

Fixes: ba0c75177 ("modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_*")
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-04-02 13:34:47 -04:00
..
Makefile.am shadow: Lift 32->24 conversion from modesetting to dix 2016-12-12 14:10:44 -05:00
dri2.c modesetting: Check for -1 before converting to unsigned int. 2018-02-02 15:19:32 -05:00
driver.c modesetting: remove fallback DRM_CAP_* defines 2018-03-21 10:06:20 -04:00
driver.h modesetting: Use atomic modesetting API for pageflip if available 2018-03-05 13:27:34 -05:00
drmmode_display.c modesetting/drmmode: add NULL pointer check in drmmode_output_dpms 2018-04-02 13:34:47 -04:00
drmmode_display.h modesetting: remove fallback DRM_CAP_* defines 2018-03-21 10:06:20 -04:00
dumb_bo.c modesetting: Include dix-config.h from dumb_bo.c 2015-05-12 08:02:11 -07:00
dumb_bo.h modesetting: Drop dumb_bo::map_count field and dead unmap code. 2014-12-11 11:26:19 -08:00
meson.build meson: Install man pages 2018-03-27 10:28:33 -04:00
modesetting.man man: s/__/@/g 2018-03-27 10:13:17 -04:00
pageflip.c Remove always true GLAMOR_HAS_DRM_* guards 2018-03-21 10:06:12 -04:00
present.c modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_* 2018-03-22 15:00:06 -04:00
vblank.c modesetting: remove always true DRM_IOCTL_CRTC_QUEUE_SEQUENCE guard 2018-03-21 10:06:18 -04:00