[PATCH] misc: xilinx-sdfec: remove check for ioctl cmd and argument.

Arnd Bergmann arnd at kernel.org
Sun Nov 1 14:49:23 EST 2020


On Sun, Nov 1, 2020 at 6:09 PM Harshal Chaudhari
<harshalchau04 at gmail.com> wrote:
>
> if (_IOC_TYPE(cmd) != PP_IOCTL)
>         return -ENOTTY;
>
> Invalid ioctl command check normally performs by “default” case.
>
> if (_IOC_DIR(cmd) != _IOC_NONE) {
>        argp = (void __user *)arg;
>        if (!argp)
>              return -EINVAL; }
>
> And for checking ioctl arguments, copy_from_user()/copy_to_user()
> checks are enough.
>
> Signed-off-by: Harshal Chaudhari <harshalchau04 at gmail.com>

Thanks for following up on this,

Reviewed-by: Arnd Bergmann <arnd at arndb.de>



More information about the linux-arm-kernel mailing list