freebsd-dev/sys/mips/rmi
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
..
dev Consistently use device_t 2016-08-09 19:32:06 +00:00
board.c
board.h
bus_space_rmi_pci.c
bus_space_rmi.c
files.xlr Remove rge driver from Broadcom XLR 2015-09-04 19:57:28 +00:00
fmn.c As <machine/param.h> is included from <sys/param.h>, there is no need 2016-02-22 09:04:36 +00:00
interrupt.h
intr_machdep.c
iodi.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
iomap.h
Makefile.msgring
mpwait.S
msgring_xls.c
msgring_xls.cfg
msgring.c
msgring.cfg
msgring.h
pcibus.h
pic.h
rmi_boot_info.h
rmi_mips_exts.h
rootfs_list.txt
std.xlr
tick.c
uart_bus_xlr_iodi.c
uart_cpu_mips_xlr.c
xlr_csum_nocopy.S
xlr_i2c.c
xlr_machdep.c Allow the use of soft-interrupts for sending IPIs. 2016-09-08 17:37:13 +00:00
xlr_pci.c mips: for pointers replace 0 with NULL. 2016-04-15 14:26:24 +00:00
xlr_pcmcia.c
xls_ehci.c Fix device delete child function. 2016-10-17 10:20:38 +00:00