From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12A2C3FB7FC; Wed, 20 May 2026 18:27:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301669; cv=none; b=KIgfdwhk9+iIuiz3d4Y1a6soy21IFKiMN8ICWE6YA03f+r43UnypexN94b3aJr3h8BO5VPiqj2m1jIHs8kYtFaeAd3AmdzvtlgeoGbndkIZTdsNFtlzCmqrIgIsiILl/srQHPLBmre/zv48dWyDa5Fs+xdka9q22N/Wsum7Ukuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779301669; c=relaxed/simple; bh=rvMYhjMB1k/8gR2XuZbsAn5a8eFEzRHV8v2/8wYVdJE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NJ9MF/LYYYk0vScuJL1S700nB+Ib8JH8CBrFSc/9ja/n803mPrAY9ab/WTxqwYTEhZT+nwBR7mAnk40gZd7qwMsSsEkPHQ1iZXulOfGvqBTnL12Un3H4KJrBc+vLv3/lZoz2Fcg3++gjcvovGJGi2I9GdH+iJtnSUBtgyrExP10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=K0bnEj2L; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="K0bnEj2L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 789BB1F000E9; Wed, 20 May 2026 18:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779301668; bh=ixMn1YulyB/5lTJ9iaDzJgvHMuRXAS2qZ4lf4xHJfik=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K0bnEj2LW7Bwm1qgeprlVii/v305Wzg5mv/eW/adFyvm4F1YIJ3l70vnClyYPF/kO 3hpDi6nBLy3w7E2LWtcL3EuvtDfpM+gSBIj1xJ1Rn9PMbbGa0whpSHZn0sx4Jc1Cg4 o6vaUM/G/p8ImrV4qNsPI6hyMARZ8aIGBhm59RGw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sebastian Brzezinka , Krzysztof Karas , Andi Shyti , Tvrtko Ursulin Subject: [PATCH 6.12 641/666] drm/i915: skip __i915_request_skip() for already signaled requests Date: Wed, 20 May 2026 18:24:12 +0200 Message-ID: <20260520162125.170367723@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162111.222830634@linuxfoundation.org> References: <20260520162111.222830634@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Brzezinka commit 4cfe4c0efbdcde742a47813180cc69b132d7598e upstream. After a GPU reset the HWSP is zeroed, so previously completed requests appear incomplete. If such a request is picked up during reset_rewind() and marked guilty, i915_request_set_error_once() returns early (fence already signaled), leaving fence.error without a fatal error code. The subsequent __i915_request_skip() then hits: ``` GEM_BUG_ON(!fatal_error(rq->fence.error)) ``` Fixes a kernel BUG observed on Sandy Bridge (Gen6) during heartbeat-triggered engine resets. ``` kernel BUG at drivers/gpu/drm/i915/i915_request.c:556! RIP: __i915_request_skip+0x15e/0x1d0 [i915] ... __i915_request_reset+0x212/0xa70 [i915] reset_rewind+0xe4/0x280 [i915] intel_gt_reset+0x30d/0x5b0 [i915] heartbeat+0x516/0x530 [i915] ``` Guard __i915_request_skip() with i915_request_signaled(), if the fence is already signaled, the ring content is committed and there is nothing left to skip. Fixes: 36e191f0644b ("drm/i915: Apply i915_request_skip() on submission") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/13729 Signed-off-by: Sebastian Brzezinka Cc: stable@vger.kernel.org # v5.7+ Reviewed-by: Krzysztof Karas Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/fe76921d35b6ae85aa651822726d0d9815aa5362.1776339012.git.sebastian.brzezinka@intel.com (cherry picked from commit 5ba54393dcd7adf75a9f39f5a933b1538349cad5) Signed-off-by: Tvrtko Ursulin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/gt/intel_reset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/gt/intel_reset.c +++ b/drivers/gpu/drm/i915/gt/intel_reset.c @@ -135,7 +135,8 @@ void __i915_request_reset(struct i915_re rcu_read_lock(); /* protect the GEM context */ if (guilty) { i915_request_set_error_once(rq, -EIO); - __i915_request_skip(rq); + if (!i915_request_signaled(rq)) + __i915_request_skip(rq); banned = mark_guilty(rq); } else { i915_request_set_error_once(rq, -EAGAIN);