This is a note to let you know that I've just added the patch titled USB: serial: ti_usb_3410_5052: fix control-message error handling to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-serial-ti_usb_3410_5052-fix-control-message-error-handling.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 39712e8bfa8d3aa6ce1e60fc9d62c9b076c17a30 Mon Sep 17 00:00:00 2001 From: Johan Hovold <johan@xxxxxxxxxx> Date: Thu, 12 Jan 2017 14:56:23 +0100 Subject: USB: serial: ti_usb_3410_5052: fix control-message error handling From: Johan Hovold <johan@xxxxxxxxxx> commit 39712e8bfa8d3aa6ce1e60fc9d62c9b076c17a30 upstream. Make sure to detect and return an error on zero-length control-message transfers when reading from the device. This addresses a potential failure to detect an empty transmit buffer during close. Also remove a redundant check for short transfer when sending a command. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/serial/ti_usb_3410_5052.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -1556,13 +1556,10 @@ static int ti_command_out_sync(struct ti (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT), value, moduleid, data, size, 1000); - if (status == size) - status = 0; - - if (status > 0) - status = -ECOMM; + if (status < 0) + return status; - return status; + return 0; } @@ -1578,8 +1575,7 @@ static int ti_command_in_sync(struct ti_ if (status == size) status = 0; - - if (status > 0) + else if (status >= 0) status = -ECOMM; return status; Patches currently in stable-queue which might be from johan@xxxxxxxxxx are queue-4.9/usb-serial-mct_u232-fix-modem-status-error-handling.patch queue-4.9/usb-serial-ark3116-fix-open-error-handling.patch queue-4.9/usb-serial-io_edgeport-fix-epic-descriptor-handling.patch queue-4.9/usb-serial-ti_usb_3410_5052-fix-control-message-error-handling.patch queue-4.9/usb-serial-keyspan_pda-fix-receive-sanity-checks.patch queue-4.9/usb-serial-sierra-fix-bogus-alternate-setting-assumption.patch queue-4.9/usb-serial-ssu100-fix-control-message-error-handling.patch queue-4.9/usb-serial-digi_acceleport-fix-incomplete-rx-sanity-check.patch queue-4.9/usb-serial-io_edgeport-fix-descriptor-error-handling.patch queue-4.9/usb-serial-quatech2-fix-control-message-error-handling.patch queue-4.9/usb-serial-ftdi_sio-fix-latency-timer-error-handling.patch