]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2013 03:46:45 +0000 (19:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2013 03:46:45 +0000 (19:46 -0800)
added patches:
usb-mos7840-fix-tiocmget-error-handling.patch

queue-3.4/series
queue-3.4/usb-mos7840-fix-tiocmget-error-handling.patch [new file with mode: 0644]

index 431388877ab99fa5c3a0ee5e7af25d3f02e2c302..1d2aa1bfe7359494d9a07bf97df0853080a2948e 100644 (file)
@@ -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 (file)
index 0000000..722206b
--- /dev/null
@@ -0,0 +1,33 @@
+From a91ccd26e75235d86248d018fe3779732bcafd8d Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Wed, 9 Oct 2013 17:01:09 +0200
+Subject: USB: mos7840: fix tiocmget error handling
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit a91ccd26e75235d86248d018fe3779732bcafd8d upstream.
+
+Make sure to return errors from tiocmget rather than rely on
+uninitialised stack data.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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)