freebsd-dev/sys/dev/puc
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
..
puc_bfe.h Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
puc_bus.h Rewrite of puc(4). Significant changes are: 2006-04-28 21:21:53 +00:00
puc_cfg.c
puc_cfg.h
puc_pccard.c
puc_pci.c
puc.c Fix device delete child function. 2016-10-17 10:20:38 +00:00
pucdata.c - Add support for Advantech PCI-1602 Rev. B1 and PCI-1603 cards. [1] 2016-01-10 18:11:23 +00:00