mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
adb: get rid of pointless access_ok()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
31acd2665b
commit
5a5011936e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user