]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe/userptr: restore invalidation list on error
authorMatthew Auld <matthew.auld@intel.com>
Fri, 21 Feb 2025 14:38:41 +0000 (14:38 +0000)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 24 Feb 2025 19:02:33 +0000 (13:02 -0600)
commit4e37e928928b730de9aa9a2f5dc853feeebc1742
tree411782468e4a89b49c351460db8d699290676029
parentb7b68c6e36776a46d47743bc53b19089f5e0029a
drm/xe/userptr: restore invalidation list on error

On error restore anything still on the pin_list back to the invalidation
list on error. For the actual pin, so long as the vma is tracked on
either list it should get picked up on the next pin, however it looks
possible for the vma to get nuked but still be present on this per vm
pin_list leading to corruption. An alternative might be then to instead
just remove the link when destroying the vma.

v2:
 - Also add some asserts.
 - Keep the overzealous locking so that we are consistent with the docs;
   updating the docs and related bits will be done as a follow up.

Fixes: ed2bdf3b264d ("drm/xe/vm: Subclass userptr vmas")
Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: <stable@vger.kernel.org> # v6.8+
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250221143840.167150-4-matthew.auld@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_vm.c