diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2023-12-05 17:41:42 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:45:28 +0300 |
commit | 06d5ae90579e774934552ca023c4bbc56e8253f4 (patch) | |
tree | daafcef546774dcc1f32d7f98cfa016f9a51d362 /drivers/gpu/drm/xe/xe_vm.c | |
parent | 5a92da34ddb4ec75a037d4a956afa993876c67d4 (diff) | |
download | linux-06d5ae90579e774934552ca023c4bbc56e8253f4.tar.xz |
drm/xe/vm: Avoid asid lookup if none allocated
The destroy path can and will get called for incomplete
vm objects on error paths, where the asid is not yet allocated.
This leads to lookup fail and assert triggered.
Fix this by not asserting of asid existence if vm never
got assigned one.
Cc: Ohad Sharabi <osharabi@habana.ai>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_vm.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 265cc0c5e440..11667529e40b 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -1634,7 +1634,7 @@ static void vm_destroy_work_func(struct work_struct *w) if (!(vm->flags & XE_VM_FLAG_MIGRATION)) { xe_device_mem_access_put(xe); - if (xe->info.has_asid) { + if (xe->info.has_asid && vm->usm.asid) { mutex_lock(&xe->usm.lock); lookup = xa_erase(&xe->usm.asid_to_vm, vm->usm.asid); xe_assert(xe, lookup == vm); |