From: Greg Kroah-Hartman Date: Sun, 24 Nov 2013 03:46:45 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.11.10~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7bbda0ebc436e966d1ad6b0dcf6d9f3da052fde5;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: usb-mos7840-fix-tiocmget-error-handling.patch --- diff --git a/queue-3.4/series b/queue-3.4/series index 431388877ab..1d2aa1bfe73 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -6,3 +6,4 @@ acpica-interpreter-fix-store-when-implicit-conversion-is-not-possible.patch acpica-derefof-operator-update-to-fully-resolve-fieldunit-and-bufferfield-refs.patch acpica-return-error-if-derefof-resolves-to-a-null-package-element.patch acpica-fix-for-a-store-argx-when-argx-contains-a-reference-to-a-field.patch +usb-mos7840-fix-tiocmget-error-handling.patch diff --git a/queue-3.4/usb-mos7840-fix-tiocmget-error-handling.patch b/queue-3.4/usb-mos7840-fix-tiocmget-error-handling.patch new file mode 100644 index 00000000000..722206bf2a0 --- /dev/null +++ b/queue-3.4/usb-mos7840-fix-tiocmget-error-handling.patch @@ -0,0 +1,33 @@ +From a91ccd26e75235d86248d018fe3779732bcafd8d Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 9 Oct 2013 17:01:09 +0200 +Subject: USB: mos7840: fix tiocmget error handling + +From: Johan Hovold + +commit a91ccd26e75235d86248d018fe3779732bcafd8d upstream. + +Make sure to return errors from tiocmget rather than rely on +uninitialised stack data. + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mos7840.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -1664,7 +1664,11 @@ static int mos7840_tiocmget(struct tty_s + return -ENODEV; + + status = mos7840_get_uart_reg(port, MODEM_STATUS_REGISTER, &msr); ++ if (status != 1) ++ return -EIO; + status = mos7840_get_uart_reg(port, MODEM_CONTROL_REGISTER, &mcr); ++ if (status != 1) ++ return -EIO; + result = ((mcr & MCR_DTR) ? TIOCM_DTR : 0) + | ((mcr & MCR_RTS) ? TIOCM_RTS : 0) + | ((mcr & MCR_LOOPBACK) ? TIOCM_LOOP : 0)