OSDN Git Service

USB: serial: ftdi_sio: fix latency-timer error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:12 +0000 (14:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 12:00:19 +0000 (14:00 +0200)
commit594c9b4b0acb9e3091c583958ee144b58d0e7bdd
treefb99e4b74aac66a65f02941109e9ef187e9f70ab
parentca4e6525df053f0e023195b571c9d6241197bc09
USB: serial: ftdi_sio: fix latency-timer error handling

commit e3e574ad85a208cb179f33720bb5f12b453de33c upstream.

Make sure to detect short responses when reading the latency timer to
avoid using stale buffer data.

Note that no heap data would currently leak through sysfs as
ASYNC_LOW_LATENCY is set by default.

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>
drivers/usb/serial/ftdi_sio.c