]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe: Use local fence in error path of xe_migrate_clear
authorMatthew Brost <matthew.brost@intel.com>
Tue, 11 Mar 2025 18:29:15 +0000 (11:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:48:00 +0000 (10:48 +0200)
commit2ac5f466f62892a7d1ac2d1a3eb6cd14efbe2f2d
tree06e6d76de94c52ef195989de6259a53f4dca8bda
parenta37e01fe60a35df354aa4c30762b91f26092ee93
drm/xe: Use local fence in error path of xe_migrate_clear

commit 20659d3150f1a2a258a173fe011013178ff2a197 upstream.

The intent of the error path in xe_migrate_clear is to wait on locally
generated fence and then return. The code is waiting on m->fence which
could be the local fence but this is only stable under the job mutex
leading to a possible UAF. Fix code to wait on local fence.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://lore.kernel.org/r/20250311182915.3606291-1-matthew.brost@intel.com
(cherry picked from commit 762b7e95362170b3e13a8704f38d5e47eca4ba74)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/xe/xe_migrate.c