summaryrefslogtreecommitdiffstats
path: root/drivers/fpga
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-05-08 03:03:04 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2020-05-29 17:04:56 +0200
commit83a4f2e70470be94c582b3d09e774fc9c4470b40 (patch)
tree4d8d9357f8889f9c5ed59479a0a58a5354a5615a /drivers/fpga
parentdrivers/fpga/dfl-fme-pr.c: get rid of pointless access_ok() (diff)
downloadlinux-83a4f2e70470be94c582b3d09e774fc9c4470b40.tar.xz
linux-83a4f2e70470be94c582b3d09e774fc9c4470b40.zip
drivers/fpga/dfl-afu-dma-region.c: get rid of pointless access_ok()
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>
Diffstat (limited to 'drivers/fpga')
-rw-r--r--drivers/fpga/dfl-afu-dma-region.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl-afu-dma-region.c
index 62f924489db5..d902acb36d14 100644
--- a/drivers/fpga/dfl-afu-dma-region.c
+++ b/drivers/fpga/dfl-afu-dma-region.c
@@ -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;