intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Sagar Ghuge <sagar.ghuge@intel.com>,
	Stuart Summers <stuart.summers@intel.com>,
	stable@vger.kernel.org
Subject: [PATCH 1/2] drm/xe/guc: Fix stack_depot usage
Date: Tue, 18 Nov 2025 11:08:11 -0800	[thread overview]
Message-ID: <20251118-fix-debug-guc-v1-1-9f780c6bedf8@intel.com> (raw)
In-Reply-To: <20251118-fix-debug-guc-v1-0-9f780c6bedf8@intel.com>

Add missing stack_depot_init() call when CONFIG_DRM_XE_DEBUG_GUC is
enabled to fix the following call stack:

	[] BUG: kernel NULL pointer dereference, address: 0000000000000000
	[] Workqueue:  drm_sched_run_job_work [gpu_sched]
	[] RIP: 0010:stack_depot_save_flags+0x172/0x870
	[] Call Trace:
	[]  <TASK>
	[]  fast_req_track+0x58/0xb0 [xe]

Fixes: 16b7e65d299d ("drm/xe/guc: Track FAST_REQ H2Gs to report where errors came from")
Tested-by: Sagar Ghuge <sagar.ghuge@intel.com>
Cc: <stable@vger.kernel.org> # v6.17+
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 2697d711adb2b..07ae0d601910e 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -236,6 +236,9 @@ int xe_guc_ct_init_noalloc(struct xe_guc_ct *ct)
 #if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
 	spin_lock_init(&ct->dead.lock);
 	INIT_WORK(&ct->dead.worker, ct_dead_worker_func);
+#if IS_ENABLED(CONFIG_DRM_XE_DEBUG_GUC)
+	stack_depot_init();
+#endif
 #endif
 	init_waitqueue_head(&ct->wq);
 	init_waitqueue_head(&ct->g2h_fence_wq);

-- 
2.51.2


  reply	other threads:[~2025-11-18 19:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 19:08 [PATCH 0/2] drm/xe: Fix and refactor CONFIG_DRM_XE_DEBUG_GUC Lucas De Marchi
2025-11-18 19:08 ` Lucas De Marchi [this message]
2025-11-18 19:13   ` [PATCH 1/2] drm/xe/guc: Fix stack_depot usage Summers, Stuart
2025-11-18 19:29   ` Michal Wajdeczko
2025-11-18 19:50     ` Lucas De Marchi
2025-11-18 20:09       ` Michal Wajdeczko
2025-11-18 20:12         ` Summers, Stuart
2025-11-19  0:50         ` Lucas De Marchi
2025-11-21 20:23           ` Lucas De Marchi
2025-11-18 19:08 ` [PATCH 2/2] drm/xe/guc_ct: Cleanup ifdef'ry Lucas De Marchi
2025-11-19 15:21   ` [PATCH] " Lucas De Marchi
2025-11-19 21:45     ` Daniele Ceraolo Spurio
2025-11-18 19:14 ` ✗ CI.checkpatch: warning for drm/xe: Fix and refactor CONFIG_DRM_XE_DEBUG_GUC Patchwork
2025-11-18 19:14 ` ✗ CI.KUnit: failure " Patchwork
2025-11-19 15:31 ` ✓ CI.KUnit: success for drm/xe: Fix and refactor CONFIG_DRM_XE_DEBUG_GUC (rev2) Patchwork
2025-11-19 16:10 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-19 17:59 ` ✗ Xe.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251118-fix-debug-guc-v1-1-9f780c6bedf8@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    --cc=sagar.ghuge@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=stuart.summers@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).