summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2007-03-06 10:47:04 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-03-09 19:52:25 -0800
commit834dbca5b6b79ddb7cf56001ea7b6d4481fdf1e7 (patch)
treedb5e2ef6cd89b81a3a0706529415ba5966ba4049 /drivers/usb
parent64543652609fc1a2a816dc38ce4f56eddda9f9a5 (diff)
downloadblackbird-obmc-linux-834dbca5b6b79ddb7cf56001ea7b6d4481fdf1e7.tar.gz
blackbird-obmc-linux-834dbca5b6b79ddb7cf56001ea7b6d4481fdf1e7.zip
USB: fix spinlock recursion in cdc-acm.c
this fixes the spinlock recursion issue. The older fix was incomplete. Signed-off-by: Oliver Neukum <oneukum@suse.de> Acked-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/class/cdc-acm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index d38a25f36ea5..31ae661e586a 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -332,9 +332,9 @@ static void acm_rx_tasklet(unsigned long _acm)
if (!ACM_READY(acm))
return;
- spin_lock(&acm->throttle_lock);
+ spin_lock_irqsave(&acm->throttle_lock, flags);
throttled = acm->throttle;
- spin_unlock(&acm->throttle_lock);
+ spin_unlock_irqrestore(&acm->throttle_lock, flags);
if (throttled)
return;
@@ -352,9 +352,9 @@ next_buffer:
dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size);
tty_buffer_request_room(tty, buf->size);
- spin_lock(&acm->throttle_lock);
+ spin_lock_irqsave(&acm->throttle_lock, flags);
throttled = acm->throttle;
- spin_unlock(&acm->throttle_lock);
+ spin_unlock_irqrestore(&acm->throttle_lock, flags);
if (!throttled)
tty_insert_flip_string(tty, buf->base, buf->size);
tty_flip_buffer_push(tty);
OpenPOWER on IntegriCloud