[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200509234557.1124086-10-viro@ZenIV.linux.org.uk>
Date: Sun, 10 May 2020 00:45:47 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org, Wu Hao <hao.wu@...el.com>
Subject: [PATCH 10/20] drivers/fpga/dfl-afu-dma-region.c: get rid of pointless access_ok()
From: Al Viro <viro@...iv.linux.org.uk>
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@...iv.linux.org.uk>
---
drivers/fpga/dfl-afu-dma-region.c | 4 ----
1 file changed, 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;
--
2.11.0
Powered by blists - more mailing lists