summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2013-03-26 10:49:55 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-26 09:28:29 -0700
commiteba0e3c3a0ba7b96f01cbe997680f6a4401a0bfc (patch)
treebf66256c3bf09f98ddc8e0c5f935f65035993f98 /drivers/usb/serial/usb-serial.c
parent85ecd0322b9a1a9f451d9150e9460ab42fd17219 (diff)
downloadlinux-eba0e3c3a0ba7b96f01cbe997680f6a4401a0bfc.tar.bz2
USB: serial: fix hang when opening port
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 Cc: stable <stable@vger.kernel.org> 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>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 2e70efa08b77..5d9b178484fd 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -903,6 +903,7 @@ static int usb_serial_probe(struct usb_interface *interface,
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);