freebsd-skq/sys/arm
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
..
allwinner Fix device delete child function. 2016-10-17 10:20:38 +00:00
altera/socfpga ARM: SEV/WFE instructions are implemented starting from ARMv6K, 2016-10-06 13:18:18 +00:00
amlogic/aml8726 ARM: Remove unused includes. 2016-10-09 10:25:47 +00:00
annapurna/alpine Split CPU_CORTEXA into CPU_CORTEXA8, for the Cortex-A8, and CPU_CORTEXA_MP, 2016-10-04 12:25:44 +00:00
arm Drop support for using mmap() with /dev/kmem. 2016-10-14 20:01:07 +00:00
at91 Fix device delete child function. 2016-10-17 10:20:38 +00:00
broadcom/bcm2835 Make BRCM2837 port conform FreeBSD/ARM64 guidelines 2016-10-14 22:23:03 +00:00
cavium/cns11xx Fix device delete child function. 2016-10-17 10:20:38 +00:00
cloudabi32 Add very preliminary support for CloudABI for ARMv6. 2016-09-18 11:36:54 +00:00
conf Add driver for GPIO controlled regulator. 2016-10-15 20:04:14 +00:00
freescale ARM: Remove unused includes. 2016-10-09 10:25:47 +00:00
include Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
lpc ARM: Remove unused includes. 2016-10-09 10:25:47 +00:00
mv ARM: Remove unused includes. 2016-10-09 10:25:47 +00:00
nvidia Fix release MSI method for NVidia Tegra PCI controller 2016-10-09 04:36:40 +00:00
qemu Split CPU_CORTEXA into CPU_CORTEXA8, for the Cortex-A8, and CPU_CORTEXA_MP, 2016-10-04 12:25:44 +00:00
rockchip ARM: Remove unused includes. 2016-10-09 10:25:47 +00:00
samsung/exynos Fix device delete child function. 2016-10-17 10:20:38 +00:00
ti Fix device delete child function. 2016-10-17 10:20:38 +00:00
versatile Restrict where we need to define fdt_fixup_table to just PowerPC and 2016-09-23 14:11:23 +00:00
xilinx Fix device delete child function. 2016-10-17 10:20:38 +00:00
xscale ARM: Remove unused includes. 2016-10-09 10:25:47 +00:00