This is a note to let you know that I've just added the patch titled drm/i915/guc: Don't drop ce->guc_active.lock when unwinding context to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-i915-guc-don-t-drop-ce-guc_active.lock-when-unwinding-context.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 88209a8ecb8b8752322908a3c3362a001bdc3a39 Mon Sep 17 00:00:00 2001 From: Matthew Brost <matthew.brost@xxxxxxxxx> Date: Thu, 9 Sep 2021 09:47:25 -0700 Subject: drm/i915/guc: Don't drop ce->guc_active.lock when unwinding context From: Matthew Brost <matthew.brost@xxxxxxxxx> commit 88209a8ecb8b8752322908a3c3362a001bdc3a39 upstream. Don't drop ce->guc_active.lock when unwinding a context after reset. At one point we had to drop this because of a lock inversion but that is no longer the case. It is much safer to hold the lock so let's do that. Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface") Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx> Signed-off-by: Matthew Brost <matthew.brost@xxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-5-matthew.brost@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ---- 1 file changed, 4 deletions(-) --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -814,8 +814,6 @@ __unwind_incomplete_requests(struct inte continue; list_del_init(&rq->sched.link); - spin_unlock(&ce->guc_active.lock); - __i915_request_unsubmit(rq); /* Push the request back into the queue for later resubmission. */ @@ -828,8 +826,6 @@ __unwind_incomplete_requests(struct inte list_add_tail(&rq->sched.link, pl); set_bit(I915_FENCE_FLAG_PQUEUE, &rq->fence.flags); - - spin_lock(&ce->guc_active.lock); } spin_unlock(&ce->guc_active.lock); spin_unlock_irqrestore(&sched_engine->lock, flags); Patches currently in stable-queue which might be from matthew.brost@xxxxxxxxx are queue-5.15/drm-i915-guc-don-t-drop-ce-guc_active.lock-when-unwinding-context.patch queue-5.15/drm-i915-guc-workaround-reset-g2h-is-received-after-schedule-done-g2h.patch queue-5.15/drm-i915-guc-fix-outstanding-g2h-accounting.patch queue-5.15/drm-i915-guc-don-t-enable-scheduling-on-a-banned-context-guc_id-invalid-not-registered.patch queue-5.15/drm-i915-guc-unwind-context-requests-in-reverse-order.patch