merged

Bruce

On Mon, Apr 20, 2020 at 7:30 AM Kevin Hao <[email protected]> wrote:
>
> From: Kevin Hao <[email protected]>
>
> The 'type' parameter has been removed from access_ok() by commit
> 96d4f267e40f ("Remove 'type' argument from access_ok() function"),
> so we should adjust our codes according to this change.
>
> Signed-off-by: Kevin Hao <[email protected]>
> ---
>  drivers/misc/otx_bphy_ctr.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/misc/otx_bphy_ctr.c b/drivers/misc/otx_bphy_ctr.c
> index b568e4acc13e..0bdb1616b7c8 100644
> --- a/drivers/misc/otx_bphy_ctr.c
> +++ b/drivers/misc/otx_bphy_ctr.c
> @@ -120,11 +120,9 @@ static long otx_dev_ioctl(struct file *f, unsigned int 
> cmd, unsigned long arg)
>                 return -ENOTTY;
>
>         if (_IOC_DIR(cmd) & _IOC_READ)
> -               err = !access_ok(VERIFY_WRITE, (void __user *)arg,
> -                                _IOC_SIZE(cmd));
> +               err = !access_ok((void __user *)arg, _IOC_SIZE(cmd));
>         else if (_IOC_TYPE(cmd) & _IOC_WRITE)
> -               err = !access_ok(VERIFY_READ, (void __user *)arg,
> -                                _IOC_SIZE(cmd));
> +               err = !access_ok((void __user *)arg, _IOC_SIZE(cmd));
>
>         if (err)
>                 return -EFAULT;
> --
> 2.26.0
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8617): 
https://lists.yoctoproject.org/g/linux-yocto/message/8617
Mute This Topic: https://lists.yoctoproject.org/mt/73146998/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to