diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-08 15:28:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-10 15:16:57 +0300 |
commit | 04cbf3832bbe21ac473e6b79571fce0c7f10a087 (patch) | |
tree | b03542fc91cc1ec9ea16051a6b3f267b9a4bfb19 /drivers/usb/class | |
parent | 11f107f708fd853bf48d5b0f8bb886e42fa009e3 (diff) | |
download | linux-04cbf3832bbe21ac473e6b79571fce0c7f10a087.tar.xz |
USB: cdc-acm: fix invalid user-pointer check
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>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 78f0f85bebdc..5535377f540e 100644 --- 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; |