freebsd-skq/sys/boot/kshim
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
..
bsd_busspace.c Implement missing bus_space_subregion in kshim 2015-11-27 18:14:45 +00:00
bsd_global.h Fix compilation errors in usb/kshim 2016-01-22 06:05:31 +00:00
bsd_kernel.c Fix device delete child function. 2016-10-17 10:20:38 +00:00
bsd_kernel.h Make the callout structure in the boot loader's kernel shim more 2016-09-14 11:16:00 +00:00
kshim.mk
sysinit.h