Skip to content

Commit

Permalink
drm/xe: fix missing 'xe_vm_put'
Browse files Browse the repository at this point in the history
Fix memleak caused by missing xe_vm_put

Fixes: 852856e ("drm/xe: Use reserved copy engine for user binds on faulting devices")
Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240901044227.1177211-1-dhirschfeld@habana.ai
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
Dafna Hirschfeld authored and Rodrigo Vivi committed Sep 6, 2024
1 parent cb85e39 commit 249df8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/xe/xe_exec_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ struct xe_exec_queue *xe_exec_queue_create_bind(struct xe_device *xe,
gt->usm.reserved_bcs_instance,
false);

if (!hwe)
if (!hwe) {
xe_vm_put(migrate_vm);
return ERR_PTR(-EINVAL);
}

q = xe_exec_queue_create(xe, migrate_vm,
BIT(hwe->logical_instance), 1, hwe,
Expand Down

0 comments on commit 249df8c

Please sign in to comment.