We're hitting a bug in CI where MAX_STACK_TRACE_ENTRIES is set too low.
My guess is the repeated loading/unloading is creating multiples of the
same entries. As a hack just reset lockdep. This might only be necessary
for CI + PREEMPT_RT.

Signed-off-by: Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/i915/i915_module.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_module.c 
b/drivers/gpu/drm/i915/i915_module.c
index 5d9c35b5a1820..4c135688d9660 100644
--- a/drivers/gpu/drm/i915/i915_module.c
+++ b/drivers/gpu/drm/i915/i915_module.c
@@ -117,6 +117,12 @@ static void __exit i915_exit(void)
                if (init_funcs[i].exit)
                        init_funcs[i].exit();
        }
+
+       /* Workaround for "MAX_STACK_TRACE_ENTRIES" too low, reset all locks 
after exit */
+#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
+       if (i915_selftest.live || i915_selftest.mock || i915_selftest.perf)
+               lockdep_reset();
+#endif
 }
 
 module_init(i915_init);
-- 
2.51.0

Reply via email to