freebsd-skq/sys/mips/cavium
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
..
cryptocteon
octe
usb Fix device delete child function. 2016-10-17 10:20:38 +00:00
asm_octeon.S
ciu.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
cvmx_config.h As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
files.octeon1
if_octm.c
obio.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
obiovar.h
octeon_cop2.h
octeon_cop2.S
octeon_ds1337.c
octeon_ebt3000_cf.c Don't assume that bio_cmd is a bitfield. 2016-03-10 06:25:47 +00:00
octeon_gpio.c
octeon_gpiovar.h
octeon_irq.h
octeon_machdep.c
octeon_mp.c Allow the use of soft-interrupts for sending IPIs. 2016-09-08 17:37:13 +00:00
octeon_nmi.S
octeon_pci_console.c
octeon_pcmap_regs.h
octeon_pmc.c
octeon_rnd.c Huge cleanup of random(4) code. 2015-06-30 17:00:45 +00:00
octeon_rtc.c
octeon_wdog.c
octopci_bus_space.c
octopci.c sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
octopcireg.h
octopcivar.h
std.octeon1
uart_bus_octeonusart.c
uart_cpu_octeonusart.c
uart_dev_oct16550.c