summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_fops.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-08-06 15:02:50 +0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-06 16:51:40 +0400
commitddde43711fdde505ac413102faa2352704cd858a (patch)
tree45a861f802ad84d6e616f9213e7c0a98366b3af8 /drivers/gpu/drm/drm_fops.c
parenteaf99c749d43ae74ac7ffece5512f3c73f01dfd2 (diff)
downloadlinux-ddde43711fdde505ac413102faa2352704cd858a.tar.xz
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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r--drivers/gpu/drm/drm_fops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 8f91062db5b6..0fa4dadac4c6 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -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);