drm/msm: Ensure vm is created in VM_BIND ioctl
Rob Clark
maintainerPATCH 1/1 drm/msm: Ensure vm is created in VM_BIND ioctl
Since the vm is lazily created, to allow userspace to opt-in to a VM_BIND context, we can't assume it is already created.
Fixes 2e6a8a1fe2b2 ("drm/msm: Add VM_BIND ioctl")
Signed-off-by Rob Clark <[email protected]>
--- drivers/gpu/drm/msm/msm_gem_vma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_gem_vma.c +1 -1
@@ -1382,7 +1382,7 @@ msm_ioctl_vm_bind(struct drm_device *dev, void *data, struct drm_file *file)* Maybe we could allow just UNMAP ops? OTOH userspace should just * immediately close the device file and all will be torn down. */ -if (to_msm_vm (ctx->vm)->unusable) +if (to_msm_vm (msm_context_vm (dev, ctx))->unusable)return UERR (EPIPE , dev,"context is unusable" );/*
Signature · 1 line
2.51.0