All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/survivability: Fix infinite loop in aux info traversal
@ 2026-11-18 18:50 Sk Anirban
  2026-11-18 19:16 ` sashiko-bot
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Sk Anirban @ 2026-11-18 18:50 UTC (permalink / raw)
  To: intel-xe
  Cc: anshuman.gupta, badal.nilawar, riana.tauro, karthik.poosa,
	raag.jadav, soham.purkait, mallesh.koujalagi, Sk Anirban

Stop traversing the aux info linked list when an entry references
itself, preventing an endless loop and soft lockup during probe.

Signed-off-by: Sk Anirban <sk.anirban@intel.com>
---
 drivers/gpu/drm/xe/xe_survivability_mode.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
index 91a0680e449b..34d39e68ff36 100644
--- a/drivers/gpu/drm/xe/xe_survivability_mode.c
+++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
@@ -172,8 +172,14 @@ static void populate_survivability_info(struct xe_device *xe)
 	if (reg_value & AUXINFO_SUPPORT) {
 		for (id = REG_FIELD_GET(AUXINFO_REG_OFFSET, reg_value);
 		     id >= AUX_INFO0 && id < MAX_SCRATCH_REG;
-		     id =  REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id]))
+		     id =  REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id])) {
 			set_survivability_info(mmio, info, id);
+			if (REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id]) == id) {
+				xe_warn(xe, "survivability: %s points to itself, stopping aux info walk\n",
+					reg_map[id]);
+				break;
+			}
+		}
 	}
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-19  5:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 18:50 [PATCH] drm/xe/survivability: Fix infinite loop in aux info traversal Sk Anirban
2026-11-18 19:16 ` sashiko-bot
2026-11-19  0:43 ` ✓ CI.KUnit: success for " Patchwork
2026-11-19  1:22 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-19  5:12 ` [PATCH] " Tauro, Riana
2026-11-19  5:13   ` Tauro, Riana
2026-11-19  5:19   ` Anirban, Sk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.