[PATCH] drm/atomic: Fix memleak on ERESTARTSYS during non-blocking commits
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Wed Jan 10 09:41:45 UTC 2018
Op 08-01-18 om 22:30 schreef Harry Wentland:
> On 2018-01-04 02:47 PM, sunpeng.li at amd.com wrote:
>> From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>
>>
>> During a non-blocking commit, it is possible to return before the
>> commit_tail work is queued (-ERESTARTSYS, for example).
>>
>> Since a reference on the crtc commit object is obtained for the pending
>> vblank event when preparing the commit, the above situation will leave
>> us with an extra reference.
>>
>> Therefore, if the commit_tail worker has not consumed the event at the
>> end of a commit, release it's reference.
>>
>> Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
> No expert on this but looks sane to me.
>
> Acked-by: Harry Wentland <harry.wentland at amd.com>
>
> Harry
Hey,
I've reverted the patch for now. I planned to apply it to the drm-misc-fixes branch with the
appropriate commits referenced, but it is causing crashes on the kms_flip testcase.
https://bugs.freedesktop.org/show_bug.cgi?id=104566
I'll investigate it some more then send out a fixed patch. :)
~Maarten
More information about the dri-devel
mailing list