From a361bd5bcad55b943c5974413b25854fb87fc3f6 Mon Sep 17 00:00:00 2001 From: Yousef Alhouseen Date: Tue, 30 Jun 2026 12:49:41 +0200 Subject: [PATCH] misc: sgi-gru: fill execution status in exception details gru_retry_exception() tests cbrexecstatus after asking gru_get_cb_exception_detail() to fill the detail structure. The helper leaves that field uninitialized, so retry decisions depend on stale stack data. Populate the address, CBR state, and execution status alongside the other exception fields, matching the user exception-detail path. Signed-off-by: Yousef Alhouseen Link: https://patch.msgid.link/20260630104941.53862-1-alhouseenyousef@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/misc/sgi-gru/grukservices.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c index 205945ce9e86..c16012ee976f 100644 --- a/drivers/misc/sgi-gru/grukservices.c +++ b/drivers/misc/sgi-gru/grukservices.c @@ -411,11 +411,14 @@ int gru_get_cb_exception_detail(void *cb, cbe = get_cbe(GRUBASE(cb), cbrnum); gru_flush_cache(cbe); /* CBE not coherent */ sync_core(); + excdet->cb = (unsigned long)cb; excdet->opc = cbe->opccpy; excdet->exopc = cbe->exopccpy; excdet->ecause = cbe->ecause; excdet->exceptdet0 = cbe->idef1upd; excdet->exceptdet1 = cbe->idef3upd; + excdet->cbrstate = cbe->cbrstate; + excdet->cbrexecstatus = cbe->cbrexecstatus; gru_flush_cache(cbe); return 0; } @@ -1154,4 +1157,3 @@ void gru_kservices_exit(void) if (gru_free_kernel_contexts()) BUG(); } -