[PATCH xserver] modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_*

Daniel Stone daniel at fooishbar.org
Thu Mar 29 08:18:31 UTC 2018


Hi Mario,

On 29 March 2018 at 00:47, Mario Kleiner <mario.kleiner.de at gmail.com> wrote:
> On Thu, Mar 22, 2018 at 7:47 PM, Adam Jackson <ajax at redhat.com> wrote:
>> @@ -2244,18 +2247,19 @@ drmmode_output_dpms(xf86OutputPtr output, int mode)
>>  {
>>      drmmode_output_private_ptr drmmode_output = output->driver_private;
>>      xf86CrtcPtr crtc = output->crtc;
>> +    modesettingPtr ms = modesettingPTR(crtc->scrn);
>
> --> This assignment above makes the X-Server crash, if output->crtc is
> NULL, and therefore crtc->scrn is a NULL ptr deref.
> output->crtc == NULL can happen from some call paths, e.g., whenever
> xf86DisableUnusedFunctions() gets called and decides to dpms off an
> output.

Ugh. It looks like we should be able to just directly use output->scrn
instead of crtc->scrn in that offending line; does that work for you?

Cheers,
Daniel


More information about the xorg-devel mailing list