public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] uvcvideo: remove unneeded access_ok() check
Date: Wed, 21 Mar 2012 11:43:51 +0100	[thread overview]
Message-ID: <3912096.1JJ7uXGCOH@avalon> (raw)
In-Reply-To: <20120321063523.GA20062@elgon.mountain>

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 <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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


      reply	other threads:[~2012-03-21 10:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21  6:35 [patch] [media] uvcvideo: remove unneeded access_ok() check Dan Carpenter
2012-03-21 10:43 ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3912096.1JJ7uXGCOH@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox