freebsd-skq/sys/dev/bhnd
hselasky 0c88dabe9d 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
..
bcma bhnd(4): Implement common API for IOST/IOCTL register access and core reset 2016-09-24 04:08:16 +00:00
bhndb bhnd: remove redundant ;s at the end of functions or switch statements 2016-09-06 13:34:10 +00:00
cores Fix device delete child function. 2016-10-17 10:20:38 +00:00
nvram bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00
siba bhnd(4): Implement common API for IOST/IOCTL register access and core reset 2016-09-24 04:08:16 +00:00
tools bhnd(4): Implement NVRAM support required for PMU bring-up. 2016-08-16 21:32:05 +00:00
bhnd_bus_if.m bhnd(4): Implement common API for IOST/IOCTL register access and core reset 2016-09-24 04:08:16 +00:00
bhnd_debug.h [bhnd] Add logging macros to BHND. 2016-05-16 23:40:32 +00:00
bhnd_erom_if.m Migrate bhndb(4) to the new bhnd_erom API. 2016-09-04 00:58:19 +00:00
bhnd_erom_types.h Implement a generic bhnd(4) device enumeration table API. 2016-09-03 23:57:17 +00:00
bhnd_erom.c Migrate bhndb(4) to the new bhnd_erom API. 2016-09-04 00:58:19 +00:00
bhnd_erom.h Migrate bhndb(4) to the new bhnd_erom API. 2016-09-04 00:58:19 +00:00
bhnd_ids.h bhnd(4): Initial PMU/PWRCTL power and clock management support. 2016-08-27 00:03:02 +00:00
bhnd_match.h Migrate bhndb(4) to the new bhnd_erom API. 2016-09-04 00:58:19 +00:00
bhnd_nexus.c bhnd(4): Implement backplane interrupt handling. 2016-09-05 22:11:46 +00:00
bhnd_nexusvar.h Switch mips/sentry5 to bhnd(4), and unify with mips/broadcom 2016-06-04 19:53:47 +00:00
bhnd_subr.c Split bcm_mipscore.c into bcm_bmips (BMIPS32/BMIPS3300) and bcm_mips74k 2016-09-18 21:28:09 +00:00
bhnd_types.h bhnd(4): Add device classes for USB host/dev/dual-mode controller cores. 2016-09-05 21:48:16 +00:00
bhnd.c bhnd(4): Implement common API for IOST/IOCTL register access and core reset 2016-09-24 04:08:16 +00:00
bhnd.h bhnd(4): Implement common API for IOST/IOCTL register access and core reset 2016-09-24 04:08:16 +00:00
bhndreg.h
bhndvar.h bhnd(4): Implement common API for IOST/IOCTL register access and core reset 2016-09-24 04:08:16 +00:00