projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31acd26
)
adb: get rid of pointless access_ok()
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 4 Jun 2017 01:50:46 +0000
(21:50 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 4 Jun 2017 17:57:24 +0000
(13:57 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/macintosh/adb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/macintosh/adb.c
b/drivers/macintosh/adb.c
index fee939efc4fc6b2677be2c81546b0a90def15e84..039dc8285fc58b20b7ffc5513207415efdaadeee 100644
(file)
--- a/
drivers/macintosh/adb.c
+++ b/
drivers/macintosh/adb.c
@@
-723,8
+723,6
@@
static ssize_t adb_read(struct file *file, char __user *buf,
return -EINVAL;
if (count > sizeof(req->reply))
count = sizeof(req->reply);
- if (!access_ok(VERIFY_WRITE, buf, count))
- return -EFAULT;
req = NULL;
spin_lock_irqsave(&state->lock, flags);
@@
-781,8
+779,6
@@
static ssize_t adb_write(struct file *file, const char __user *buf,
return -EINVAL;
if (adb_controller == NULL)
return -ENXIO;
- if (!access_ok(VERIFY_READ, buf, count))
- return -EFAULT;
req = kmalloc(sizeof(struct adb_request),
GFP_KERNEL);