Browse Source

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>
Ville Syrjälä 11 năm trước cách đây
mục cha
commit
ddde43711f
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      drivers/gpu/drm/drm_fops.c

+ 2 - 0
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);