]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe: Don't allow evicting of BOs in same VM in array of VM binds
authorMatthew Brost <matthew.brost@intel.com>
Thu, 9 Oct 2025 11:06:18 +0000 (04:06 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 9 Oct 2025 18:40:19 +0000 (11:40 -0700)
commit8b9ba8d6d95fe75fed6b0480bb03da4b321bea08
tree1562dab5fa374bce5b8167a7a03e9631d3f38fa2
parent146046907b56578263434107f5a7d5051847c459
drm/xe: Don't allow evicting of BOs in same VM in array of VM binds

An array of VM binds can potentially evict other buffer objects (BOs)
within the same VM under certain conditions, which may lead to NULL
pointer dereferences later in the bind pipeline. To prevent this, clear
the allow_res_evict flag in the xe_bo_validate call.

v2:
 - Invert polarity of no_res_evict (Thomas)
 - Add comment in code explaining issue (Thomas)

Cc: stable@vger.kernel.org
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6268
Fixes: 774b5fa509a9 ("drm/xe: Avoid evicting object of the same vm in none fault mode")
Fixes: 77f2ef3f16f5 ("drm/xe: Lock all gpuva ops during VM bind IOCTL")
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://lore.kernel.org/r/20251009110618.3481870-1-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm_types.h