]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: mct_u232: fix modem-status error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:16 +0000 (14:56 +0100)
committerJohan Hovold <johan@kernel.org>
Mon, 16 Jan 2017 15:38:56 +0000 (16:38 +0100)
commit527b71f2a7bfab279f438b9df68b33f30389cccd
treeb22ebd4ccc8ff200b9fca70f9876f948d7bbee51
parent59447bf72b03844382942cd1185f5d32ee52b2ba
USB: serial: mct_u232: fix modem-status error handling

Make sure to detect short control-message transfers so that errors are
logged when reading the modem status at open.

Note that while this also avoids initialising the modem status using
uninitialised heap data, these bits could not leak to user space as they
are currently not used.

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