Skip to content

Commit

Permalink
drm: Warn when leaking flip events on close
Browse files Browse the repository at this point in the history
Warn when there are events on the file_priv->event_list just before
file_priv gets freed. This can occur if the driver doesn't clean up
pending page flip events in ->preclose().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
  • Loading branch information
Ville Syrjälä authored and Daniel Vetter committed Aug 6, 2014
1 parent eaf99c7 commit ddde437
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/drm_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ int drm_release(struct inode *inode, struct file *filp)
if (drm_core_check_feature(dev, DRIVER_PRIME))
drm_prime_destroy_file_private(&file_priv->prime);

WARN_ON(!list_empty(&file_priv->event_list));

put_pid(file_priv->pid);
kfree(file_priv);

Expand Down

0 comments on commit ddde437

Please sign in to comment.