[PATCH 0/2] Don't use xshmfence unless supported by the driver

Fredrik Höglund fredrik at kde.org
Wed Nov 20 02:45:51 PST 2013


On Wednesday 20 November 2013, Keith Packard wrote:
> Keith Packard <keithp at keithp.com> writes:
> 
> > This makes the xshmfence stuff only used if the driver specifies it,
> > allowing drivers to specify other FD-passing based fences, and also
> > avoiding errors if a driver doesn't initialize any FD-passing based
> > fences.
> >
> > Without these changes, the X server will crash when an application
> > creates an xshmfence object and passes that to the X server to a
> > driver that has no DRI3 FD passing support.
> 
> I'd love to see if anyone wants to give this patch a try, or at least
> look over it. It's a serious bug in the X server that applications
> using the DRI3 extension incorrectly can currently crash X.

I have tested the patches and can confirm that DRI3FenceFromFD
now generates BadMatch and that the server no longer crashes
when the driver doesn't implement the hooks.

I also decided to try passing a regular sync fence to DRI3FDFromFence.
I expected it to generate an error, but it didn't. Instead it returned
a valid file descriptor. I don't know if this is a bug or not.

Fredrik



More information about the xorg-devel mailing list