Re: [PATCH] pvr: acquire vm_ctx->lock before mapping memory to GPU VM

From: Icenowy Zheng

Date: Tue Apr 21 2026 - 13:57:27 EST


Oops, wrong commit title prefix... Wrote too commits for Mesa recently.

Should be drm/imagination: instead.

Will send a replacement patch (and remove an unreachable Cc).

Quite sorry,
Icenowy

在 2026-04-22三的 01:52 +0800,Icenowy Zheng写道:
> The drm gpuvm code doesn't protect find operation against map
> operation,
> and the driver needs to ensure a map operation shouldn't happen when
> a
> find operation is in progress.
>
> As all occurences of drm_gpuva_find*() is already guarded by
> vm_ctx->lock, make pvr_vm_map() to acquire this lock to prevent
> disturbing any find operation.
>
> This fixes occasional NULL deference in drm_gpuva_find*().
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 4bc736f890ce ("drm/imagination: vm: make use of GPUVM's
> drm_exec helper")
> Signed-off-by: Icenowy Zheng <zhengxingda@xxxxxxxxxxx>