Commit ddde4371 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm: Warn when leaking flip events on close

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent eaf99c74
...@@ -529,6 +529,8 @@ int drm_release(struct inode *inode, struct file *filp) ...@@ -529,6 +529,8 @@ int drm_release(struct inode *inode, struct file *filp)
if (drm_core_check_feature(dev, DRIVER_PRIME)) if (drm_core_check_feature(dev, DRIVER_PRIME))
drm_prime_destroy_file_private(&file_priv->prime); drm_prime_destroy_file_private(&file_priv->prime);
WARN_ON(!list_empty(&file_priv->event_list));
put_pid(file_priv->pid); put_pid(file_priv->pid);
kfree(file_priv); kfree(file_priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment