Hi Dan,

Thank you for the patch.

On Wednesday 21 March 2012 09:35:23 Dan Carpenter wrote:
> copy_in_user() already checks for write permission, so we don't need to
> do it here.  This was added in 1a5e4c867c "[media] uvcvideo: Implement
> compat_ioctl32 for custom ioctls".
> 
> Signed-off-by: Dan Carpenter <[email protected]>

Acked-by: Laurent Pinchart <[email protected]>

And applied to my tree.

> diff --git a/drivers/media/video/uvc/uvc_v4l2.c
> b/drivers/media/video/uvc/uvc_v4l2.c index ff2cddd..111bfff 100644
> --- a/drivers/media/video/uvc/uvc_v4l2.c
> +++ b/drivers/media/video/uvc/uvc_v4l2.c
> @@ -1105,8 +1105,6 @@ static int uvc_v4l2_put_xu_mapping(const struct
> uvc_xu_control_mapping *kp, if (get_user(p, &up->menu_info))
>               return -EFAULT;
>       umenus = compat_ptr(p);
> -     if (!access_ok(VERIFY_WRITE, umenus, kp->menu_count * sizeof(*umenus)))
> -             return -EFAULT;
> 
>       if (copy_in_user(umenus, kmenus, kp->menu_count * sizeof(*umenus)))
>               return -EFAULT;

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to