Page MenuHomeFreeBSD

D47154.diff
No OneTemporary

D47154.diff

diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -1477,11 +1477,14 @@
PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev)));
- /* detach parent before deleting children, if any */
+ /*
+ * Detach child. Ideally this cleans up any grandchild
+ * devices.
+ */
if ((error = device_detach(child)) != 0)
return (error);
- /* remove children second */
+ /* Delete any grandchildren left after detach. */
while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) {
error = device_delete_child(child, grandchild);
if (error)

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 11:46 AM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14229921
Default Alt Text
D47154.diff (613 B)

Event Timeline