Am Freitag 29 August 2008 01:00:35 schrieb greg@kroah.com:
> + dum->port_status[rhport] |=
I realise it is commented out, but still.
The resume method may sleep. It is documented as such. Thus it can
reenable interrupts. Therefore you can deadlock if you don't use irqrestore.
> +static void vhci_tx_urb(struct urb *urb)
There's no reason to hold the lock longer than necessary by
allocating memory in the lock section.
[..]
again
> +static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
This is called in the context of usb_submit_urb()
[..]
This can fail for any urb due to urb->reject
> + if (ret)
The branch would be taken
[..]
This calls urb->complete. If the completion handler takes a spinlock
which is held when usb_submit_urb() was called, you deadlock.
> +static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
[..]
This must be called with interrupts disabled.
> + spin_lock_irqsave(&the_controller->lock, flags);
Regards
Oliver
--
| Ingo Molnar | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Roland Dreier | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Linus Torvalds | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
