Skip to content

Commit ddde437

Browse files
vsyrjaladanvet
authored andcommitted
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>
1 parent eaf99c7 commit ddde437

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/gpu/drm/drm_fops.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ int drm_release(struct inode *inode, struct file *filp)
529529
if (drm_core_check_feature(dev, DRIVER_PRIME))
530530
drm_prime_destroy_file_private(&file_priv->prime);
531531

532+
WARN_ON(!list_empty(&file_priv->event_list));
533+
532534
put_pid(file_priv->pid);
533535
kfree(file_priv);
534536

0 commit comments

Comments
 (0)