Skip to content

Commit 83a4f2e

Browse files
author
Al Viro
committed
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 <[email protected]>
1 parent c9a4bb4 commit 83a4f2e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/fpga/dfl-afu-dma-region.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ int afu_dma_map_region(struct dfl_feature_platform_data *pdata,
324324
if (user_addr + length < user_addr)
325325
return -EINVAL;
326326

327-
if (!access_ok((void __user *)(unsigned long)user_addr,
328-
length))
329-
return -EINVAL;
330-
331327
region = kzalloc(sizeof(*region), GFP_KERNEL);
332328
if (!region)
333329
return -ENOMEM;

0 commit comments

Comments
 (0)