[Mesa-dev] [PATCH] xf86drm: Fix error path in drmGetDevice2

Michel Dänzer michel at daenzer.net
Mon Jul 30 10:23:04 UTC 2018


On 2018-07-30 12:13 PM, Mariusz Ceier wrote:
> On 30 July 2018 at 11:31, Michel Dänzer <michel at daenzer.net> wrote:
>> On 2018-07-29 10:20 AM, Mariusz Ceier wrote:
>>> In drmGetDevice2 when no local device is found or when
>>> drm_device_has_rdev filters out all devices, *device might be left
>>> uninitialized causing drmGetDevice2 to not return error - since
>>> it's only returned when *device == NULL.
>>>
>>> Above leads to crash in the firefox in system with amdgpu.
>>>
>>> With this change firefox displays:
>>>
>>> libGL error: MESA-LOADER: failed to retrieve device information
>>> libGL error: unable to load driver: amdgpu_dri.so
>>> libGL error: driver pointer missing
>>> libGL error: failed to load driver: amdgpu
>>> libGL error: MESA-LOADER: failed to retrieve device information
>>> libGL error: unable to load driver: amdgpu_dri.so
>>> libGL error: driver pointer missing
>>> libGL error: failed to load driver: amdgpu
>>>
>>> and doesn't crash.
>>>
>>> Signed-off-by: Mariusz Ceier <mceier+mesa-dev at gmail.com>
>>
>> Good catch. Please add:
>>
>> Bugzilla: https://bugs.freedesktop.org/107384
>> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
>>
>> Do you need somebody to push this for you?
> 
> Yes, I don't have push access :)
> Also should I send v2 patch with the Bugzilla and Reviewed-by tags ?

No need, I'll add the tags and push it. Thanks!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list