freebsd-dev/sys
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
..
amd64 Do not try to create /dev/efi device node before devfs is initialized. 2016-10-16 06:07:43 +00:00
arm Fix device delete child function. 2016-10-17 10:20:38 +00:00
arm64 Fix the build, struct vfpstate needs to be visible to userspace as it's 2016-10-15 16:29:06 +00:00
boot Fix device delete child function. 2016-10-17 10:20:38 +00:00
bsm
cam Revert timeout part of r307507. 2016-10-17 09:16:44 +00:00
cddl Add vfs.zfs.zil_log_limit sysctl. 2016-10-16 18:49:15 +00:00
compat linuxkpi: Fix PCI BAR lazy allocation support. 2016-09-30 05:51:11 +00:00
conf Import the current version of netmap, aligned with the one on github. 2016-10-16 14:13:32 +00:00
contrib Fix octeon model comparison in Cavium SDK 2016-10-13 17:16:32 +00:00
crypto Fix typo in skein amd64 assembly 2016-09-08 02:38:55 +00:00
ddb Determine the operand/address size of %cs in a new function 2016-09-25 16:30:29 +00:00
dev Fix device delete child function. 2016-10-17 10:20:38 +00:00
fs Fix panic() message reporting ufs instead of nandfs 2016-10-13 19:33:07 +00:00
gdb
geom Fix possible geom destruction before final provider close. 2016-10-06 15:20:05 +00:00
gnu Revert and redo r306083. 2016-09-22 15:17:36 +00:00
i386 Drop support for using mmap() with /dev/kmem. 2016-10-14 20:01:07 +00:00
isa
kern Fix device delete child function. 2016-10-17 10:20:38 +00:00
kgssapi
libkern
mips Fix device delete child function. 2016-10-17 10:20:38 +00:00
modules Import the current version of netmap, aligned with the one on github. 2016-10-16 14:13:32 +00:00
net add a missing header. 2016-10-16 18:27:41 +00:00
net80211 [net80211] add some more RX flags. 2016-10-17 04:30:10 +00:00
netgraph Avoid panic from ng_uncallout when unpluggin ethernet cable with active 2016-08-08 19:31:01 +00:00
netinet Fix cases where the TFO pending counter would leak references, and eventually, memory. 2016-10-15 01:41:28 +00:00
netinet6 - Revert r300854, r303657 which tried to fix regression from r297225. 2016-10-13 20:15:47 +00:00
netipsec Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. 2016-09-15 07:41:48 +00:00
netnatm
netpfil pf: port extended DSCP support from OpenBSD 2016-10-13 20:34:44 +00:00
netsmb
nfs Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
nfsclient
nfsserver
nlm
ofed Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4 2016-09-30 08:23:06 +00:00
opencrypto opencrypto AES-ICM: Fix heap corruption typo 2016-08-01 22:57:03 +00:00
pc98 Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
powerpc Fix booting on systems that use loader(8) (most of them). 2016-10-16 04:22:04 +00:00
riscv Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
rpc Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
security Don't check aq64_minfree which is unsigned for negative values. 2016-09-08 19:47:57 +00:00
sparc64 Fix building on i386 and arm. But 'public domain' headers on the files 2016-10-13 06:56:23 +00:00
sys Do not try to create /dev/efi device node before devfs is initialized. 2016-10-16 06:07:43 +00:00
teken
tests
tools Consider CROSS_BINUTILS_PREFIX environment variable so we use correct 2016-08-10 13:49:17 +00:00
ufs vfs: remove the __bo_vnode field from struct vnode 2016-09-30 17:11:03 +00:00
vm If vm_fault_hold(9) finds that fs.m is wired, do not free it after a 2016-10-17 08:17:06 +00:00
x86 Reprogram I/O APIC interrupt pins when registering an I/O APIC. 2016-10-14 21:51:50 +00:00
xdr
xen xen/vchan: change license of header from Lesser GPL v2.1 to BSD 2016-09-30 13:41:24 +00:00
Makefile