dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Aishwarya Pant <aishpant@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org,
	outreachy-kernel@googlegroups.com,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm/gem: use new idr deletion interface to cleanup drm_gem_handle_delete()
Date: Tue, 26 Sep 2017 14:50:32 +0530	[thread overview]
Message-ID: <20170926092032.GA14610@aishwarya> (raw)
In-Reply-To: <150641713210.12806.16416549985820505069@mail.alporthouse.com>

On Tue, Sep 26, 2017 at 10:12:12AM +0100, Chris Wilson wrote:
> Quoting Aishwarya Pant (2017-09-25 19:47:28)
> > The IDR deletion interface now returns the deleted entry or NULL if it was not
> > present. So we don't have to do the extra work of checking if we have a
> > reference on the drm_gem_object, this can be handled by checking the return
> > value from idr_remove() and the extra locks can be dropped.
> > 
> > Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> 
> This reintroduces the bug were the idr entry is available for reuse
> before the drivers have had the change to release their resources. So a
> new handle may be reused that is then hooked up to the old private data.
> See commit f6cd7daecff558fab2c45d15283d3e52f688342d
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Fri Apr 15 12:55:08 2016 +0100
> 
>     drm: Release driver references to handle before making it available again

Thanks, this makes sense now.

> -Chris
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-09-26  9:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 18:47 [PATCH] drm/gem: use new idr deletion interface to cleanup drm_gem_handle_delete() Aishwarya Pant
2017-09-26  8:20 ` [Outreachy kernel] " Daniel Vetter
2017-09-26  8:38   ` Julia Lawall
2017-09-26  8:47     ` Daniel Vetter
2017-09-26  9:05       ` Daniel Vetter
2017-09-26 10:20         ` Julia Lawall
2017-09-26  9:11   ` Aishwarya Pant
2017-09-26  9:12 ` Chris Wilson
2017-09-26  9:20   ` Aishwarya Pant [this message]
2017-09-29  4:52 ` [drm/gem] 05eadb82a7: BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/mutex.c kernel test robot

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=20170926092032.GA14610@aishwarya \
    --to=aishpant@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=outreachy-kernel@googlegroups.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox