NetBSD/sys/external
skrll 197d83126f Protect access of urb->hcpriv by adapting the following change from the
Raspberry PI dwc_otg driver.

38753ce72d

dwc_otg: prevent OOPSes during device disconnects

The dwc_otg_urb_enqueue function is thread-unsafe. In particular the
access of urb->hcpriv, usb_hcd_link_urb_to_ep, dwc_otg_urb->qtd and
friends does not occur within a critical section and so if a device
was unplugged during activity there was a high chance that the
usbcore hub_thread would try to disable the endpoint with partially-
formed entries in the URB queue. This would result in BUG() or null
pointer dereferences.

Fix so that access of urb->hcpriv, enqueuing to the hardware and
adding to usbcore endpoint URB lists is contained within a single
critical section.
2014-01-02 15:54:10 +00:00
..
bsd Protect access of urb->hcpriv by adapting the following change from the 2014-01-02 15:54:10 +00:00
isc/atheros_hal Remove unused variable 2013-09-12 12:10:11 +00:00