On Thu, 2025-11-20 at 18:14 +0200, Mika Kuoppala wrote:
> When the pagefault handling code was moved to a new file, an extra
> drm_exec_init() was added to the VMA path. This call is unnecessary
> because
> xe_validation_ctx_init() already performs a drm_exec_init(),
> resulting in a
> memory leak reported by kmemleak.
> 
> Remove the redundant drm_exec_init() from the VMA pagefault handling
> code.
> 
> Fixes: fb544b844508 ("drm/xe: Implement xe_pagefault_queue_work")
> Cc: Matthew Brost <[email protected]>
> Cc: Stuart Summers <[email protected]>
> Cc: Lucas De Marchi <[email protected]>
> Cc: "Thomas Hellström" <[email protected]>
> Cc: Rodrigo Vivi <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: "Christian König" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Mika Kuoppala <[email protected]>

Reviewed-by: Thomas Hellström <[email protected]>
> ---
>  drivers/gpu/drm/xe/xe_pagefault.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pagefault.c
> b/drivers/gpu/drm/xe/xe_pagefault.c
> index fe3e40145012..afb06598b6e1 100644
> --- a/drivers/gpu/drm/xe/xe_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_pagefault.c
> @@ -102,7 +102,6 @@ static int xe_pagefault_handle_vma(struct xe_gt
> *gt, struct xe_vma *vma,
>  
>       /* Lock VM and BOs dma-resv */
>       xe_validation_ctx_init(&ctx, &vm->xe->val, &exec, (struct
> xe_val_flags) {});
> -     drm_exec_init(&exec, 0, 0);
>       drm_exec_until_all_locked(&exec) {
>               err = xe_pagefault_begin(&exec, vma, tile->mem.vram,
>                                        needs_vram == 1);

Reply via email to