freebsd-skq/sys/dev/usb
Hans Petter Selasky d3bf5efc1f Fix device delete child function.
When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().

Device drivers implementing trees, must ensure its detach function
detaches or deletes all its children before returning.

While at it remove now redundant device_detach() calls before
device_delete_child() and device_delete_children(), mostly in
the USB controller drivers.

Tested by:		Jan Henrik Sylvester <me@janh.de>
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D8070
MFC after:		2 weeks
2016-10-17 10:20:38 +00:00
..
controller Fix device delete child function. 2016-10-17 10:20:38 +00:00
gadget
input const-ify struct evdev_methods 2016-10-03 17:20:34 +00:00
misc
net [fdt] Add one more heuristic to determine MAC address of the SMSC device 2016-10-12 19:53:10 +00:00
quirk Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
serial Add new USB ID. 2016-09-30 05:28:11 +00:00
storage Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
template Resolve deadlock between device_detach() and usbd_do_request_flags() 2016-09-05 15:35:58 +00:00
video Fix device delete child function. 2016-10-17 10:20:38 +00:00
wlan net80211: convert all ieee80211_input_mimo*() consumers 2016-10-12 20:50:13 +00:00
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb_bus.h
usb_busdma.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_busdma.h
usb_cdc.h
usb_controller.h
usb_core.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_core.h Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_debug.c
usb_debug.h
usb_dev.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_dev.h
usb_device.c Fix device delete child function. 2016-10-17 10:20:38 +00:00
usb_device.h Resolve deadlock between device_detach() and usbd_do_request_flags() 2016-09-05 15:35:58 +00:00
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_freebsd_loader.h Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_freebsd.h Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_generic.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_generic.h
usb_handle_request.c
usb_hid.c
usb_hub.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_hub.h
usb_if.m
usb_ioctl.h
usb_lookup.c
usb_mbuf.c
usb_mbuf.h
usb_msctest.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_msctest.h
usb_parse.c
usb_pci.h
usb_pf.c
usb_pf.h
usb_process.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_process.h
usb_request.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_request.h
usb_transfer.c Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usb_transfer.h
usb_util.c Resolve deadlock between device_detach() and usbd_do_request_flags() 2016-09-05 15:35:58 +00:00
usb_util.h
usb.h
usbdevs Add new USB ID. 2016-09-30 05:28:11 +00:00
usbdi_util.h
usbdi.h Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
usbhid.h