Re: [PATCH] drm/i915: Annotate user relocs with __user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 01, 2017 at 07:54:34PM +0300, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Add the missing __user to the urelocs cast to fix the following sparse
> warning:
> i915_gem_execbuffer.c:1541:47: warning: cast removes address space of expression
> i915_gem_execbuffer.c:1541:62: warning: incorrect type in argument 2 (different address spaces)
> i915_gem_execbuffer.c:1541:62:    expected void const [noderef] <asn:1>*from
> i915_gem_execbuffer.c:1541:62:    got char *
> 
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx
> Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array")
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Pushed to dinq with Maarten's irq r-b

20:18 < vsyrjala> some care to r-b https://patchwork.freedesktop.org/patch/174831/ ?
...
20:39 < mlankhorst> irc r-b
20:48 < mlankhorst> vsyrjala: ^

> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 8a9d37ac16d4..96f7fa983cbc 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1538,7 +1538,7 @@ static int eb_copy_relocations(const struct i915_execbuffer *eb)
>  				min_t(u64, BIT_ULL(31), size - copied);
>  
>  			if (__copy_from_user((char *)relocs + copied,
> -					     (char *)urelocs + copied,
> +					     (char __user *)urelocs + copied,
>  					     len)) {
>  				kvfree(relocs);
>  				err = -EFAULT;
> -- 
> 2.13.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux