提交 834dbca5 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

USB: fix spinlock recursion in cdc-acm.c

this fixes the spinlock recursion issue. The older fix was incomplete.
Signed-off-by: NOliver Neukum <oneukum@suse.de>
Acked-by: NPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 64543652
......@@ -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 @@ static void acm_rx_tasklet(unsigned long _acm)
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册