[Intel-gfx] [PATCH 11/39] drm/i915: Allow userspace to clone contexts on creation
Chris Wilson
chris at chris-wilson.co.uk
Thu Mar 14 16:56:16 UTC 2019
Quoting Tvrtko Ursulin (2019-03-14 16:18:17)
>
> On 13/03/2019 14:43, Chris Wilson wrote:
> > +static int create_clone(struct i915_user_extension __user *ext, void *data)
> > +{
> > + struct drm_i915_gem_context_create_ext_clone local;
> > + struct i915_gem_context *dst = data;
> > + struct i915_gem_context *src;
> > + int err;
> > +
> > + if (copy_from_user(&local, ext, sizeof(local)))
> > + return -EFAULT;
> > +
> > + if (local.flags & I915_CONTEXT_CLONE_UNKNOWN)
> > + return -EINVAL;
> > +
> > + if (local.rsvd)
> > + return -EINVAL;
> > +
> > + if (local.clone_id == dst->user_handle) /* good guess! denied. */
>
> As I said it's a funny comment but please put in something more obvious.
No... I meant to rewrite how the contexts are published to avoid this
potential embarrassment.
-Chris
More information about the Intel-gfx
mailing list