[PATCH 2/6] USB: fsl_qe_udc: Fix recursive locking bug in ch9getstatus()

2008-12-25 Thread Anton Vorontsov
The call chain is this: qe_udc_irq() <- grabs the udc->lock spinlock rx_irq() qe_ep0_rx() ep0_setup_handle() setup_received_handle() ch9getstatus() qe_ep_queue() <- tries to grab the udc->lock again It seems unsafe to temporarily drop the lock in the ch9getstatus(), so to fix that bug the lock-le

Re: [PATCH 2/6] usb/fsl_qe_udc: Fix recursive locking bug in ch9getstatus()

2008-11-17 Thread David Brownell
On Tuesday 11 November 2008, Anton Vorontsov wrote: > -   spin_lock_irqsave(&udc->lock, flags); > +   if (lock) > +   spin_lock_irqsave(lock, flags); Ugly ugly ugly. Conditional locking is error prone ... don't. Couldn't you just have the usb_ep_queue() method wrap lock calls

[PATCH 2/6] usb/fsl_qe_udc: Fix recursive locking bug in ch9getstatus()

2008-11-11 Thread Anton Vorontsov
The call chain is this: qe_udc_irq() <- grabs the udc->lock spinlock rx_irq() qe_ep0_rx() ep0_setup_handle() setup_received_handle() ch9getstatus() qe_ep_queue() <- tries to grab the udc->lock again It seems unsafe to temporarily drop the lock in the ch9getstatus(), so to fix that bug the __qe_ep