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>

authored by Oliver Neukum and committed by Greg Kroah-Hartman 834dbca5 64543652

+4 -4
+4 -4
drivers/usb/class/cdc-acm.c
··· 332 332 if (!ACM_READY(acm)) 333 333 return; 334 334 335 - spin_lock(&acm->throttle_lock); 335 + spin_lock_irqsave(&acm->throttle_lock, flags); 336 336 throttled = acm->throttle; 337 - spin_unlock(&acm->throttle_lock); 337 + spin_unlock_irqrestore(&acm->throttle_lock, flags); 338 338 if (throttled) 339 339 return; 340 340 ··· 352 352 dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); 353 353 354 354 tty_buffer_request_room(tty, buf->size); 355 - spin_lock(&acm->throttle_lock); 355 + spin_lock_irqsave(&acm->throttle_lock, flags); 356 356 throttled = acm->throttle; 357 - spin_unlock(&acm->throttle_lock); 357 + spin_unlock_irqrestore(&acm->throttle_lock, flags); 358 358 if (!throttled) 359 359 tty_insert_flip_string(tty, buf->base, buf->size); 360 360 tty_flip_buffer_push(tty);