]> git.proxmox.com Git - mirror_ubuntu-focal-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)
commit36356a669eddb32917fc4b5c2b9b8bf80ede69de
treeb22ebd4ccc8ff200b9fca70f9876f948d7bbee51
parent750acdd781cf7e97c8c60d2ff5053dd4b12bbc84
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