[PATCH] tests/intel/xe_exec_reset: Explicitly declare exec

Jonathan Cavitt jonathan.cavitt at intel.com
Mon Oct 14 21:31:24 UTC 2024


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.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
CC: Jani Saarinen <jani.saarinen at intel.com>
---
 tests/intel/xe_exec_reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
index b5d5f43eab..fdfefa91cc 100644
--- a/tests/intel/xe_exec_reset.c
+++ b/tests/intel/xe_exec_reset.c
@@ -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 */
-- 
2.43.0



More information about the igt-dev mailing list