diff options
author | Oliver Neukum <oneukum@suse.de> | 2007-05-07 02:33:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-06-26 02:38:05 -0400 |
commit | 944dc184f6fe0dc63633099ba87cb75fe4ee0c51 (patch) | |
tree | 10dd3bf2d600e2fc8884c6581ed0f2b80af8cf74 /drivers/usb | |
parent | 8cfbe7e60d9618d8f80a3cd218c45dd64cb9e5cf (diff) |
USB: ti serial driver sleeps with spinlock held
you are submitting an URB with GFP_KERNEL holding a spinlock.
In this case the spinlock can be dropped earlier.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 4203e2b1a761..3d505fd0645b 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -1555,15 +1555,17 @@ static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty) | |||
1555 | spin_lock_irqsave(&tport->tp_lock, flags); | 1555 | spin_lock_irqsave(&tport->tp_lock, flags); |
1556 | 1556 | ||
1557 | if (tport->tp_read_urb_state == TI_READ_URB_STOPPED) { | 1557 | if (tport->tp_read_urb_state == TI_READ_URB_STOPPED) { |
1558 | tport->tp_read_urb_state = TI_READ_URB_RUNNING; | ||
1558 | urb = tport->tp_port->read_urb; | 1559 | urb = tport->tp_port->read_urb; |
1560 | spin_unlock_irqrestore(&tport->tp_lock, flags); | ||
1559 | urb->complete = ti_bulk_in_callback; | 1561 | urb->complete = ti_bulk_in_callback; |
1560 | urb->context = tport; | 1562 | urb->context = tport; |
1561 | urb->dev = tport->tp_port->serial->dev; | 1563 | urb->dev = tport->tp_port->serial->dev; |
1562 | status = usb_submit_urb(urb, GFP_KERNEL); | 1564 | status = usb_submit_urb(urb, GFP_KERNEL); |
1565 | } else { | ||
1566 | tport->tp_read_urb_state = TI_READ_URB_RUNNING; | ||
1567 | spin_unlock_irqrestore(&tport->tp_lock, flags); | ||
1563 | } | 1568 | } |
1564 | tport->tp_read_urb_state = TI_READ_URB_RUNNING; | ||
1565 | |||
1566 | spin_unlock_irqrestore(&tport->tp_lock, flags); | ||
1567 | 1569 | ||
1568 | return status; | 1570 | return status; |
1569 | } | 1571 | } |