All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/prime: Move all unreferences on fd_to_handle error paths to after unlock
Date: Thu, 15 Oct 2015 08:57:00 +1000	[thread overview]
Message-ID: <CAPM=9tzC_Qhipz5xXB=G7wZScyL7BnNq6QJFxY76+4KRsW8yWg@mail.gmail.com> (raw)
In-Reply-To: <1444816320-3038-1-git-send-email-chris@chris-wilson.co.uk>

On 14 October 2015 at 19:52, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> If we need to take the error path and drop the references to the objects
> and handle we created earlier, there is a possibility that we then free
> the object and then attempt to free any associated PRIME resources under
> the prime mutex. If we are holding the prime mutex when we attempt to
> free the handle/object, we risk a recursive deadlock.

This doesn't fix the case where drm_gem_handle_create_tail internally
fails and calls drm_gem_handle_delete, which then takes the lock again.

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

      parent reply	other threads:[~2015-10-14 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14  3:08 drm prime locking recursion Dave Airlie
2015-10-14  9:52 ` [PATCH] drm/prime: Move all unreferences on fd_to_handle error paths to after unlock Chris Wilson
2015-10-14 10:01   ` Chris Wilson
2015-10-14 22:57   ` Dave Airlie [this message]

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='CAPM=9tzC_Qhipz5xXB=G7wZScyL7BnNq6QJFxY76+4KRsW8yWg@mail.gmail.com' \
    --to=airlied@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@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.