[PATCH xserver] prime: clean up slave bo properly. (v2)

Dave Airlie airlied at gmail.com
Fri Apr 29 09:05:09 UTC 2016


On 29 April 2016 at 17:56, Julien Cristau <jcristau at debian.org> wrote:
> On Fri, Apr 29, 2016 at 15:54:28 +1000, Dave Airlie wrote:
>
>> This is an ABI break, in that we now pass NULL to a function
>> that hasn't accepted it before.
>>
>> Alex Goins had a different patch for this but it wasn't symmetrical,
>> it freed something in a very different place than it allocated it,
>> this attempts to retain symmetry in the releasing of the backing bo.
>>
>> v2: use a new toplevel API, though it still passes NULL to something
>> that wasn't expecting it.
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>
> AIUI you're assuming the handle will never be 0, even though that's a
> valid fd.  Are we somehow sure that'll never happen?
>

In the X server I think we can pretty safely say fd 0 won't pop up,

I could I suppose pass handle -1 instead.

Dave.


More information about the xorg-devel mailing list