[PATCH] drm: Add missing __user annotation

David Herrmann dh.herrmann at gmail.com
Mon Jul 21 04:48:35 PDT 2014


Hi

On Mon, Jul 21, 2014 at 1:24 PM, Thierry Reding
<thierry.reding at gmail.com> wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> The drm_copy_field() function copies strings into userspace buffers, so
> the first parameter needs to have a __user annotation to avoid warnings
> from the sparse checker.

Reviewed-by: David Herrmann <dh.herrmann at gmail.com>

Thanks
David

> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>  drivers/gpu/drm/drm_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 8218078b6133..0cc182745e31 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -233,7 +233,7 @@ module_exit(drm_core_exit);
>  /**
>   * Copy and IOCTL return string to user space
>   */
> -static int drm_copy_field(char *buf, size_t *buf_len, const char *value)
> +static int drm_copy_field(char __user *buf, size_t *buf_len, const char *value)
>  {
>         int len;
>
> --
> 2.0.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list