drivers/fpga/dfl-afu-dma-region.c: get rid of pointless access_ok()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 8 May 2020 01:03:04 +0000 (21:03 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 29 May 2020 15:04:56 +0000 (11:04 -0400)
Address is passed to get_user_pages_fast(), which does access_ok().
NB: this is called only from ->ioctl(), and only under USER_DS.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/fpga/dfl-afu-dma-region.c

index 62f9244..d902acb 100644 (file)
@@ -324,10 +324,6 @@ int afu_dma_map_region(struct dfl_feature_platform_data *pdata,
        if (user_addr + length < user_addr)
                return -EINVAL;
 
-       if (!access_ok((void __user *)(unsigned long)user_addr,
-                      length))
-               return -EINVAL;
-
        region = kzalloc(sizeof(*region), GFP_KERNEL);
        if (!region)
                return -ENOMEM;