Messages in this thread | | | From | Arnd Bergmann <> | Date | Sun, 1 Nov 2020 20:49:23 +0100 | Subject | Re: [PATCH] misc: xilinx-sdfec: remove check for ioctl cmd and argument. |
| |
On Sun, Nov 1, 2020 at 6:09 PM Harshal Chaudhari <harshalchau04@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@gmail.com>
Thanks for following up on this,
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
| |