]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Fix null pointer dereference in devcoredump cleanup
authorZhanjun Dong <zhanjun.dong@intel.com>
Thu, 26 Mar 2026 18:10:17 +0000 (14:10 -0400)
committerVinay Belgaumkar <vinay.belgaumkar@intel.com>
Wed, 22 Apr 2026 20:52:18 +0000 (13:52 -0700)
commit12ef528d78adc8ea4e7e3db594f3bcac327e79fa
treeac8deae5d93083001efd30760d5e463c08b22bf1
parentdc9ccf14dc2ad44e3df4928015923735f0101bfd
drm/xe: Fix null pointer dereference in devcoredump cleanup

In xe_devcoredump_snapshot_free(), ss->gt may be NULL when the snapshot
was never fully populated (e.g., when cleanup is triggered without a
prior capture). Guard the xe_guc_capture_put_matched_nodes() call with
IS_ERR_OR_NULL() to prevent a null dereference.

In xe_devcoredump_free(), the deferred work is only queued when a
coredump is captured, so guard cancel_work_sync() with a check on
coredump->captured.

Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patch.msgid.link/20260326181017.2060209-1-zhanjun.dong@intel.com
drivers/gpu/drm/xe/xe_devcoredump.c