]> www.infradead.org Git - users/hch/configfs.git/commit
drm/xe: Free job before xe_exec_queue_put
authorMatthew Brost <matthew.brost@intel.com>
Tue, 20 Aug 2024 20:23:09 +0000 (13:23 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Wed, 21 Aug 2024 15:38:37 +0000 (08:38 -0700)
commit32a42c93b74c8ca6d0915ea3eba21bceff53042f
tree2557d044046e633d664f7614b311b262a833c7ad
parent60db6f540af9f93144d5039140aa2ed17171d168
drm/xe: Free job before xe_exec_queue_put

Free job depends on job->vm being valid, the last xe_exec_queue_put can
destroy the VM. Prevent UAF by freeing job before xe_exec_queue_put.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Jagmeet Randhawa <jagmeet.randhawa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240820202309.1260755-1-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_sched_job.c