]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Apr 2013 22:27:04 +0000 (15:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Apr 2013 22:27:04 +0000 (15:27 -0700)
added patches:
usb-serial-add-modem-status-change-wait-queue.patch
usb-serial-fix-hang-when-opening-port.patch

queue-3.8/series
queue-3.8/usb-serial-add-modem-status-change-wait-queue.patch [new file with mode: 0644]
queue-3.8/usb-serial-fix-hang-when-opening-port.patch [new file with mode: 0644]

index c9fd4227be151c714e39312b55376a3f88752ca3..1e670a9a0bf11764059755322a52176e0f96718a 100644 (file)
@@ -56,3 +56,5 @@ btrfs-fix-locking-on-root_replace-operations-in-tree-mod-log.patch
 btrfs-fix-race-between-mmap-writes-and-compression.patch
 btrfs-limit-the-global-reserve-to-512mb.patch
 btrfs-don-t-drop-path-when-printing-out-tree-errors-in-scrub.patch
+usb-serial-add-modem-status-change-wait-queue.patch
+usb-serial-fix-hang-when-opening-port.patch
diff --git a/queue-3.8/usb-serial-add-modem-status-change-wait-queue.patch b/queue-3.8/usb-serial-add-modem-status-change-wait-queue.patch
new file mode 100644 (file)
index 0000000..e100007
--- /dev/null
@@ -0,0 +1,43 @@
+From e5b33dc9d16053c2ae4c2c669cf008829530364b Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Tue, 19 Mar 2013 09:21:10 +0100
+Subject: USB: serial: add modem-status-change wait queue
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit e5b33dc9d16053c2ae4c2c669cf008829530364b upstream.
+
+Add modem-status-change wait queue to struct usb_serial_port that
+subdrivers can use to implement TIOCMIWAIT.
+
+Currently subdrivers use a private wait queue which may have been
+released when waking up after device disconnected.
+
+Note that we're adding a new wait queue rather than reusing the tty-port
+one as we do not want to get woken up at hangup (yet).
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/usb/serial.h |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/include/linux/usb/serial.h
++++ b/include/linux/usb/serial.h
+@@ -66,6 +66,7 @@
+  *    port.
+  * @flags: usb serial port flags
+  * @write_wait: a wait_queue_head_t used by the port.
++ * @delta_msr_wait: modem-status-change wait queue
+  * @work: work queue entry for the line discipline waking up.
+  * @throttled: nonzero if the read urb is inactive to throttle the device
+  * @throttle_req: nonzero if the tty wants to throttle us
+@@ -112,6 +113,7 @@ struct usb_serial_port {
+       unsigned long           flags;
+       wait_queue_head_t       write_wait;
++      wait_queue_head_t       delta_msr_wait;
+       struct work_struct      work;
+       char                    throttled;
+       char                    throttle_req;
diff --git a/queue-3.8/usb-serial-fix-hang-when-opening-port.patch b/queue-3.8/usb-serial-fix-hang-when-opening-port.patch
new file mode 100644 (file)
index 0000000..9070525
--- /dev/null
@@ -0,0 +1,35 @@
+From eba0e3c3a0ba7b96f01cbe997680f6a4401a0bfc Mon Sep 17 00:00:00 2001
+From: Ming Lei <tom.leiming@gmail.com>
+Date: Tue, 26 Mar 2013 10:49:55 +0800
+Subject: USB: serial: fix hang when opening port
+
+From: Ming Lei <tom.leiming@gmail.com>
+
+commit eba0e3c3a0ba7b96f01cbe997680f6a4401a0bfc upstream.
+
+Johan's 'fix use-after-free in TIOCMIWAIT' patchset[1] introduces
+one bug which can cause kernel hang when opening port.
+
+This patch initialized the 'port->delta_msr_wait' waitqueue head
+to fix the bug which is introduced in 3.9-rc4.
+
+[1], http://marc.info/?l=linux-usb&m=136368139627876&w=2
+
+Signed-off-by: Ming Lei <tom.leiming@gmail.com>
+Acked-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/usb-serial.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/usb-serial.c
++++ b/drivers/usb/serial/usb-serial.c
+@@ -897,6 +897,7 @@ static int usb_serial_probe(struct usb_i
+               port->port.ops = &serial_port_ops;
+               port->serial = serial;
+               spin_lock_init(&port->lock);
++              init_waitqueue_head(&port->delta_msr_wait);
+               /* Keep this for private driver use for the moment but
+                  should probably go away */
+               INIT_WORK(&port->work, usb_serial_port_work);