All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: Deadlock in intel_user_framebuffer_destroy()
Date: Mon, 29 Jun 2015 14:24:19 +0300	[thread overview]
Message-ID: <874mlqzrj0.fsf@intel.com> (raw)
In-Reply-To: <20150615120705.GX28462@nuc-i3427.alporthouse.com>

On Mon, 15 Jun 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Mon, Jun 15, 2015 at 02:02:23PM +0200, Daniel Vetter wrote:
>> On Mon, Jun 15, 2015 at 08:53:02AM +0100, Chris Wilson wrote:
>> > On Mon, Jun 15, 2015 at 09:44:15AM +0300, Jani Nikula wrote:
>> > > On Wed, 03 Jun 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> > > > On Wed, Jun 03, 2015 at 03:43:32PM +0200, Lukas Wunner wrote:
>> > > >> 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").
>> > > >> 
>> > > >
>> > > > Just move the mutex_lock down a step.
>> > > 
>> > > Lucas, did you try this?
>> > 
>> > There's a goto unlock that also needed to be disabled, such as
>> 
>> Your previous patch placed the mutex_lock before the goto out_unlock - I
>> fail to see what has been broken with that version? Can you resubmit that
>> as a proper patch with sob and Lucas' t-b?
>
> There wasn't, I just rewrote it incorrectly. There's also a
> drm_framebuffer_remove() called by intelfb_alloc which needs to be moved
> out of the mutex. A much larger disentangling of the functions involved
> here is required. Tvrstko volunteered himself. Brave, very brave :)

-ETIMEDOUT

IIUC we still need the fix, but there's no update from Lucas addressing
review. Is that right?

BR,
Jani.


> -Chris
>
> -- 
> Chris Wilson, Intel Open Source Technology Centre

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-29 11:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-06-29 14:42             ` Lukas Wunner
2015-06-30  7:57               ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874mlqzrj0.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.