summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_process.c
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2015-10-20 19:52:59 +0000
committerdumbbell <dumbbell@FreeBSD.org>2015-10-20 19:52:59 +0000
commitfff41eb460e1fb0d65ac2f413911ce6460ca8127 (patch)
treefd729bbc0f2aacb48e993bcd34b183ddc5445e8e /sys/kern/sys_process.c
parent5807c0b063023542925bc5d870e1227559e0db26 (diff)
downloadFreeBSD-src-fff41eb460e1fb0d65ac2f413911ce6460ca8127.zip
FreeBSD-src-fff41eb460e1fb0d65ac2f413911ce6460ca8127.tar.gz
iicbus: Use device_delete_children() instead of explicit child removal
If the bus is detached and deleted by a call to device_delete_child() or device_delete_children() on a device higher in the tree, I²C children were already detached and deleted. So the device_t pointer stored in sc points to freed memory: we must not try to delete it again. By using device_delete_children(), we let subr_bus.c figure out if there are children to take care of. While here, make sure iicbus_detach() and iicoc_detach() call device_delete_children() too, to be safe. Reviewed by: jhb, imp Approved by: jhb, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3926
Diffstat (limited to 'sys/kern/sys_process.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud