Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: Warn when leaking flip events on close
@ 2014-08-06 11:02 ville.syrjala
  2014-08-06 11:02 ` [PATCH 2/2] drm/i915: Free pending page flip events at .preclose() ville.syrjala
  0 siblings, 1 reply; 5+ messages in thread
From: ville.syrjala @ 2014-08-06 11:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 8f91062..0fa4dad 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);
 
-- 
1.8.5.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-06 14:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-06 11:02 [PATCH 1/2] drm: Warn when leaking flip events on close ville.syrjala
2014-08-06 11:02 ` [PATCH 2/2] drm/i915: Free pending page flip events at .preclose() ville.syrjala
2014-08-06 12:52   ` Daniel Vetter
2014-08-06 13:12     ` [PATCH igt] tests: Add kms_flip_event_leak test ville.syrjala
2014-08-06 14:10   ` [PATCH 2/2] drm/i915: Free pending page flip events at .preclose() Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox