[Bug 87955] WARNING: CPU: 6 PID: 102 at drivers/gpu/drm/i915/intel_display.c:8977 intel_fb_obj_invalidate+0xe1/0xf0 [i915]()
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jan 2 01:17:21 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=87955
--- Comment #1 from Chris Wilson <chris at chris-wilson.co.uk> ---
That should correspond to:
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
which is presumably a race in mutex_is_locked_by(), specifically if we inspect
mutex->owner after the atomic_dec(&mutex->count) in mutex_lock() but before
mutex_set_owner().
This appears to be an issue for CONFIG_DEBUG_MUTEXES since:
void mutex_lock()
{
#ifndef CONFIG_DEBUG_MUTEXES
/*
* When debugging is enabled we must not clear the owner before time,
* the slow path will always be taken, and that clears the owner field
* after verifying that it was indeed current.
*/
mutex_clear_owner(lock);
#endif
}
So the correct fix is:
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index ad55b06a3cb1..4c14db9587a6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5024,7 +5024,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 */
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20150102/b163eabd/attachment-0001.html>
More information about the intel-gfx-bugs
mailing list