Skip to content

Commit fceff12

Browse files
k-niemiecAndi Shyti
authored andcommitted
drm/i915/gt: Empty uabi engines list during intel_engines_release()
While the uabi_engines_llist is populated in intel_engines_init() during driver load, the corresponding function intel_engines_release() does not correctly get rid of it. This can lead to a UAF if, after failed initialization (for example when gt is set wedged on init), we try to access the engines. Suggested-by: Chris Wilson <[email protected]> Signed-off-by: Krzysztof Niemiec <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 843f10c commit fceff12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/i915/gt/intel_engine_cs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,8 @@ void intel_engines_release(struct intel_gt *gt)
693693

694694
memset(&engine->reset, 0, sizeof(engine->reset));
695695
}
696+
697+
llist_del_all(&gt->i915->uabi_engines_llist);
696698
}
697699

698700
void intel_engine_free_request_pool(struct intel_engine_cs *engine)

0 commit comments

Comments
 (0)