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:
11f107f
)
USB: cdc-acm: fix invalid user-pointer check
author
Johan Hovold
<johan@kernel.org>
Tue, 8 Nov 2016 12:28:23 +0000
(13:28 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 12:16:57 +0000
(13:16 +0100)
Drop invalid user-pointer check from TIOCGSERIAL handler.
A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/class/cdc-acm.c
b/drivers/usb/class/cdc-acm.c
index 78f0f85bebdc25ef971405175feb621865f4cad1..5535377f540eced25ba6c26ea1c432a4abb57a11 100644
(file)
--- a/
drivers/usb/class/cdc-acm.c
+++ b/
drivers/usb/class/cdc-acm.c
@@
-877,9
+877,6
@@
static int get_serial_info(struct acm *acm, struct serial_struct __user *info)
{
struct serial_struct tmp;
- if (!info)
- return -EINVAL;
-
memset(&tmp, 0, sizeof(tmp));
tmp.flags = ASYNC_LOW_LATENCY;
tmp.xmit_fifo_size = acm->writesize;