From: Ville Syrjälä Date: Wed, 6 Aug 2014 11:02:50 +0000 (+0300) Subject: drm: Warn when leaking flip events on close X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ddde43711fdde505ac413102faa2352704cd858a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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ä --- 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);