public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"
@ 2015-01-14 21:39 Chris Wilson
  2015-01-15  7:13 ` Jani Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2015-01-14 21:39 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Daniel Vetter

The core fix was applied in

commit a63b03e2d2477586440741677ecac45bcf28d7b1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jan 6 10:29:35 2015 +0000

    mutex: Always clear owner field upon mutex_unlock()

(note the absence of stable@ tag)

so we can now revert our band-aid commit 226e5ae9e5f910 for -next.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b06f051a73de..31219af4b7a5 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5082,7 +5082,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
 	if (!mutex_is_locked(mutex))
 		return false;
 
-#if defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES)
+#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
 	return mutex->owner == task;
 #else
 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
-- 
2.1.4

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

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

* Re: [PATCH] Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"
  2015-01-14 21:39 [PATCH] Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES" Chris Wilson
@ 2015-01-15  7:13 ` Jani Nikula
  2015-01-17  4:05   ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2015-01-15  7:13 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: Daniel Vetter

On Wed, 14 Jan 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> The core fix was applied in
>
> commit a63b03e2d2477586440741677ecac45bcf28d7b1
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Tue Jan 6 10:29:35 2015 +0000
>
>     mutex: Always clear owner field upon mutex_unlock()
>
> (note the absence of stable@ tag)
>
> so we can now revert our band-aid commit 226e5ae9e5f910 for -next.

Daniel, this one is for dinq, not fixes.

BR,
Jani.

>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index b06f051a73de..31219af4b7a5 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -5082,7 +5082,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
>  	if (!mutex_is_locked(mutex))
>  		return false;
>  
> -#if defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES)
> +#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
>  	return mutex->owner == task;
>  #else
>  	/* Since UP may be pre-empted, we cannot assume that we own the lock */
> -- 
> 2.1.4
>

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

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

* Re: [PATCH] Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"
  2015-01-15  7:13 ` Jani Nikula
@ 2015-01-17  4:05   ` Daniel Vetter
  2015-01-17  9:51     ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2015-01-17  4:05 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Daniel Vetter, intel-gfx

On Thu, Jan 15, 2015 at 09:13:02AM +0200, Jani Nikula wrote:
> On Wed, 14 Jan 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > The core fix was applied in
> >
> > commit a63b03e2d2477586440741677ecac45bcf28d7b1
> > Author: Chris Wilson <chris@chris-wilson.co.uk>
> > Date:   Tue Jan 6 10:29:35 2015 +0000
> >
> >     mutex: Always clear owner field upon mutex_unlock()
> >
> > (note the absence of stable@ tag)
> >
> > so we can now revert our band-aid commit 226e5ae9e5f910 for -next.
>
> Daniel, this one is for dinq, not fixes.

I tried to apply it, then noticed that I don't even have the original
patch in there yet. It's sitting in your latest -fixes pull (which means
that patch is not really needed since the real fix in the mutex code
landed). Imo better if we don't ship a kernel with this.
-Daniel

>
> BR,
> Jani.
>
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index b06f051a73de..31219af4b7a5 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -5082,7 +5082,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
> >   if (!mutex_is_locked(mutex))
> >   return false;
> >
> > -#if defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES)
> > +#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
> >   return mutex->owner == task;
> >  #else
> >   /* Since UP may be pre-empted, we cannot assume that we own the lock */
> > --
> > 2.1.4
> >
>
> --
> Jani Nikula, Intel Open Source Technology Center

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"
  2015-01-17  4:05   ` Daniel Vetter
@ 2015-01-17  9:51     ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2015-01-17  9:51 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Jani Nikula, Daniel Vetter, intel-gfx

On Sat, Jan 17, 2015 at 05:05:47AM +0100, Daniel Vetter wrote:
> On Thu, Jan 15, 2015 at 09:13:02AM +0200, Jani Nikula wrote:
> > On Wed, 14 Jan 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > > The core fix was applied in
> > >
> > > commit a63b03e2d2477586440741677ecac45bcf28d7b1
> > > Author: Chris Wilson <chris@chris-wilson.co.uk>
> > > Date:   Tue Jan 6 10:29:35 2015 +0000
> > >
> > >     mutex: Always clear owner field upon mutex_unlock()
> > >
> > > (note the absence of stable@ tag)
> > >
> > > so we can now revert our band-aid commit 226e5ae9e5f910 for -next.
> >
> > Daniel, this one is for dinq, not fixes.
> 
> I tried to apply it, then noticed that I don't even have the original
> patch in there yet. It's sitting in your latest -fixes pull (which means
> that patch is not really needed since the real fix in the mutex code
> landed). Imo better if we don't ship a kernel with this.

No. The core patch is not for stable, and we need a patch for stable.
Since it is lower risk (at least for us) to modify our code, that is
what I opted to do.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-01-17  9:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-14 21:39 [PATCH] Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES" Chris Wilson
2015-01-15  7:13 ` Jani Nikula
2015-01-17  4:05   ` Daniel Vetter
2015-01-17  9:51     ` Chris Wilson

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