From: Daniel Vetter Date: Tue, 3 Feb 2015 10:45:40 +0000 (+0100) Subject: drm/i915: Remove bogus locking check in the hangcheck code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b838cbee0d6f0234406e435032b2304f3d05515d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm/i915: Remove bogus locking check in the hangcheck code You can _never_ assert that a lock is not held, except in some very restricted corner cases where it's guranteed that your code is running single-threade (e.g. driver load before you've published any pointers leading to that lock). In addition the early return breaks a bunch of testcases since with highly concurrent hangcheck stress tests the reset fails to work and the test doesn't recover and time out. This regression has been introduced in commit b8d24a06568368076ebd5a858a011699a97bfa42 Author: Mika Kuoppala Date: Wed Jan 28 17:03:14 2015 +0200 drm/i915: Remove nested work in gpu error handling Aside: It is possible to check whether a given task doesn't hold a lock, but only when lockdep is enabled, using the lockdep_assert_held stuff. Cc: Chris Wilson Cc: Mika Kuoppala Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88908 Reviewed-by: Mika Kuoppala Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 53c5f9e39fe3..4145d95902f5 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2612,9 +2612,6 @@ void i915_handle_error(struct drm_device *dev, bool wedged, va_list args; char error_msg[80]; - if (WARN_ON(mutex_is_locked(&dev_priv->dev->struct_mutex))) - return; - va_start(args, fmt); vscnprintf(error_msg, sizeof(error_msg), fmt, args); va_end(args);