From: Daniel Vetter <daniel@ffwll.ch>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/2] drm/i915: fix possible refcount leak when resetting forcewake
Date: Fri, 6 Jun 2014 22:35:37 +0200 [thread overview]
Message-ID: <20140606203537.GY7416@phenom.ffwll.local> (raw)
In-Reply-To: <1402085968.4193.14.camel@ideak-mobl>
On Fri, Jun 06, 2014 at 11:19:28PM +0300, Imre Deak wrote:
> On Fri, 2014-06-06 at 22:15 +0200, Daniel Vetter wrote:
> > On Fri, Jun 06, 2014 at 09:38:26PM +0300, Imre Deak wrote:
> > > On Fri, 2014-06-06 at 19:46 +0200, Daniel Vetter wrote:
> > > > On Fri, Jun 06, 2014 at 12:08:43PM +0100, Chris Wilson wrote:
> > > > > On Fri, Jun 06, 2014 at 02:04:37PM +0300, Imre Deak wrote:
> > > > > > If the timer putting the last forcewake refcount was pending and we
> > > > > > canceled it, we'll leak the corresponding forcewake and RPM references.
> > > > > >
> > > > > > v2:
> > > > > > - do the ptr casting at the caller instead of adding a separate helper
> > > > > > for this (Chris)
> > > > > >
> > > > > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > > > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > >
> > > > Both patches merged to dinq (Chris clarified on irc that his r-b is for
> > > > both).
> > > >
> > > > Since this only blows up in a super-contrived testcase I don't
> > > > think this is material for -fixes.
> > >
> > > Note that the issue fixed by 1/2 could also happen normally, though the
> > > window for race is small. One scenario would be runtime resume
> > > ->deferred rps_enable followed directly by system suspend or gpu reset.
> >
> > The default runtime pm autosuspend delay is longer than the delayed rps
> > enable, so for all practical purposes I think this is impossible.
>
> But system suspend is not affected by that delay, it can happen right
> after a runtime resume.
Until we drop the forcewake time we hold a runtime pm ref. So I don't
think there's an issue either on that side of the system resume ... Or do
I miss something?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-06-06 20:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 9:59 [PATCH 1/2] drm/i915: fix possible refcount leak when resetting forcewake Imre Deak
2014-06-06 9:59 ` [PATCH 2/2] drm/i915: preserve user forcewake over system suspend/resume Imre Deak
2014-06-06 10:03 ` [PATCH 1/2] drm/i915: fix possible refcount leak when resetting forcewake Chris Wilson
2014-06-06 11:04 ` [PATCH v2 " Imre Deak
2014-06-06 11:08 ` Chris Wilson
2014-06-06 17:46 ` Daniel Vetter
2014-06-06 18:38 ` Imre Deak
2014-06-06 20:15 ` Daniel Vetter
2014-06-06 20:19 ` Imre Deak
2014-06-06 20:35 ` Daniel Vetter [this message]
2014-06-06 20:44 ` Imre Deak
2014-06-06 20:54 ` Daniel Vetter
2014-06-10 16:35 ` 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=20140606203537.GY7416@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=imre.deak@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox