Skip to content

Commit

Permalink
drm/fence: release fence reference when canceling event
Browse files Browse the repository at this point in the history
If the event gets canceled we also need to put away the fence
reference it holds.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1476975005-30441-3-git-send-email-gustavo@padovan.org
  • Loading branch information
Gustavo Padovan authored and Daniel Vetter committed Oct 21, 2016
1 parent 7fb71c8 commit 838de39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/drm_fops.c
Original file line number Diff line number Diff line change
@@ -663,6 +663,10 @@ void drm_event_cancel_free(struct drm_device *dev,
list_del(&p->pending_link);
}
spin_unlock_irqrestore(&dev->event_lock, flags);

if (p->fence)
fence_put(p->fence);

kfree(p);
}
EXPORT_SYMBOL(drm_event_cancel_free);

0 comments on commit 838de39

Please sign in to comment.