[PATCH] drm/xe: fix missing 'xe_vm_put'
Nirmoy Das
nirmoy.das at linux.intel.com
Mon Sep 2 15:04:58 UTC 2024
On 9/1/2024 6:42 AM, Dafna Hirschfeld wrote:
> Fix memleak caused by missing xe_vm_put
>
> Signed-off-by: Dafna Hirschfeld <dhirschfeld at habana.ai>
Fixes: 852856e3b6f6 ("drm/xe: Use reserved copy engine for user binds on
faulting devices")
Reviewed-by: Nirmoy Das <nirmoy.das at intel.com>
> ---
> drivers/gpu/drm/xe/xe_exec_queue.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
> index fa4ed168b53b..df3ea337f55c 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
> @@ -252,8 +252,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,
More information about the Intel-xe
mailing list