public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* Deadlock in intel_user_framebuffer_destroy()
@ 2015-06-03 13:43 Lukas Wunner
  2015-06-03 13:57 ` Chris Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Lukas Wunner @ 2015-06-03 13:43 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

Hi,

a deadlock was introduced by commit 60a5ca015ffd2aacfe5674b5a401cd2a37159e07

Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri Jun 13 11:10:53 2014 +0300

    drm/i915: Add locking around framebuffer_references--


The commit amended intel_display.c:intel_user_framebuffer_destroy() with
mutex_lock(&dev->struct_mutex).

A few weeks prior Chris Wilson had amended intel_fbdev.c:intelfb_create()
with a call to drm_framebuffer_unreference() while &dev->struct_mutex is
locked (commit edd586fe705e819bc711b5ed7194a0b6f9f1a7e1, "drm/i915: Discard
BIOS framebuffers too small to accommodate chosen mode").

This leads to the following call chain while &dev->struct_mutex is locked:

intel_fbdev.c:intelfb_create()
  -> drm_crtc.c:drm_framebuffer_unreference()
       -> drm_crtc.c:drm_framebuffer_free()
            -> intel_display.c:intel_user_framebuffer_destroy()

The last function in that call chain attempts to re-lock the mutex.
The functionality added by Chris Wilson is thus rendered broken.

Best regards,

Lukas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-06-30  7:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 13:43 Deadlock in intel_user_framebuffer_destroy() Lukas Wunner
2015-06-03 13:57 ` Chris Wilson
2015-06-15  6:44   ` Jani Nikula
2015-06-15  7:34     ` Lukas Wunner
2015-06-15  7:53     ` Chris Wilson
2015-06-15  9:25       ` Tvrtko Ursulin
2015-06-15 12:02       ` Daniel Vetter
2015-06-15 12:07         ` Chris Wilson
2015-06-29 11:24           ` Jani Nikula
2015-06-29 14:42             ` Lukas Wunner
2015-06-30  7:57               ` Jani Nikula

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