]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
USB: serial: io_ti: fix div-by-zero in set_termios
authorJohan Hovold <johan@kernel.org>
Thu, 11 May 2017 09:41:21 +0000 (11:41 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 26 May 2017 22:19:44 +0000 (17:19 -0500)
commitb3d399a6e110d988bbe949c8043ceb6e33b02ab3
treef22a2456ee70a2033312ad163ed1c022e94b557b
parent9ac0fd68dbc4a1564e118fbcca15a7c2325f4008
USB: serial: io_ti: fix div-by-zero in set_termios

BugLink: http://bugs.launchpad.net/bugs/1693932
commit 6aeb75e6adfaed16e58780309613a578fe1ee90b upstream.

Fix a division-by-zero in set_termios when debugging is enabled and a
high-enough speed has been requested so that the divisor value becomes
zero.

Instead of just fixing the offending debug statement, cap the baud rate
at the base as a zero divisor value also appears to crash the firmware.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/usb/serial/io_ti.c