Skip to contentSkip to conversation

tests/intel/xe_exec_reset: Explicitly declare exec

PATCH New Jonathan Cavitt 1 participant 1 message Oct 14, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/intel/xe_exec_reset: Explicitly declare exec

In the gt-reset-stress subtest, we define a drm_xe_exec exec without declaring any of its variable values. Explicitly declare exec to equal an empty struct to prevent any values from being assigned garbage data during execution.

---
 tests/intel/xe_exec_reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/intel/xe_exec_reset.c +1 -1
index b5d5f43eab..fdfefa91cc 100644
@@ -628,7 +628,7 @@ static void submit_jobs(struct gt_thread_data *t)
 			.engine_instance = 0,
 			.gt_id = 0,
 		};
-		struct drm_xe_exec exec;
+		struct drm_xe_exec exec = {};
 		int ret;
 
 		/* GuC IDs can get exhausted */
Signature · 1 line
2.43.0