]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/sync: Cleanup partially initialized sync on parse failure
authorShuicheng Lin <shuicheng.lin@intel.com>
Thu, 19 Feb 2026 23:35:18 +0000 (23:35 +0000)
committerMatthew Brost <matthew.brost@intel.com>
Fri, 20 Feb 2026 18:49:07 +0000 (10:49 -0800)
commitf939bdd9207a5d1fc55cced5459858480686ce22
tree0857990b748a49a1795b72aa02354703a8e5b8f3
parent9ca192cbcd5b9baefdc3c4a0d2740e04a427cd18
drm/xe/sync: Cleanup partially initialized sync on parse failure

xe_sync_entry_parse() can allocate references (syncobj, fence, chain fence,
or user fence) before hitting a later failure path. Several of those paths
returned directly, leaving partially initialized state and leaking refs.

Route these error paths through a common free_sync label and call
xe_sync_entry_cleanup(sync) before returning the error.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260219233516.2938172-5-shuicheng.lin@intel.com
drivers/gpu/drm/xe/xe_sync.c