]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
drm: Warn when leaking flip events on close
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 6 Aug 2014 11:02:50 +0000 (14:02 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 6 Aug 2014 12:51:40 +0000 (14:51 +0200)
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>
drivers/gpu/drm/drm_fops.c

index 8f91062db5b668f54d52e99afec510b24c990c88..0fa4dadac4c6ed552181d1d9079630fbb9834a88 100644 (file)
@@ -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);