[PATCH linux dev-4.10 v3 20/31] drivers: fsi: occ: Remove early user buffer checking
Eddie James
eajames at linux.vnet.ibm.com
Fri Oct 6 06:24:13 AEDT 2017
From: "Edward A. James" <eajames at us.ibm.com>
We check user buffer access when we copy the data in read()/write()
anyway.
Signed-off-by: Edward A. James <eajames at us.ibm.com>
---
drivers/fsi/occ.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/fsi/occ.c b/drivers/fsi/occ.c
index a551349..7ced9b6 100644
--- a/drivers/fsi/occ.c
+++ b/drivers/fsi/occ.c
@@ -247,12 +247,6 @@ static ssize_t occ_read(struct file *file, char __user *buf, size_t len,
{
struct occ_client *client = file->private_data;
- /* check this ahead of time so we don't go changing the xfr state
- * needlessly
- */
- if (!access_ok(VERIFY_WRITE, buf, len))
- return -EFAULT;
-
return occ_read_common(client, buf, NULL, len);
}
@@ -316,12 +310,6 @@ static ssize_t occ_write(struct file *file, const char __user *buf,
{
struct occ_client *client = file->private_data;
- /* check this ahead of time so we don't go changing the xfr state
- * needlessly
- */
- if (!access_ok(VERIFY_READ, buf, len))
- return -EFAULT;
-
return occ_write_common(client, buf, NULL, len);
}
--
1.8.3.1
More information about the openbmc
mailing list