Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103797778
D8070.id20855.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
727 B
Referenced Files
None
Subscribers
None
D8070.id20855.diff
View Options
Index: sys/kern/subr_bus.c
===================================================================
--- sys/kern/subr_bus.c
+++ sys/kern/subr_bus.c
@@ -1949,15 +1949,17 @@
PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev)));
- /* remove children first */
+ /* detach parent before deleting children, if any */
+ if ((error = device_detach(child)) != 0)
+ return (error);
+
+ /* remove children second */
while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) {
error = device_delete_child(child, grandchild);
if (error)
return (error);
}
- if ((error = device_detach(child)) != 0)
- return (error);
if (child->devclass)
devclass_delete_device(child->devclass, child);
if (child->parent)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 2:23 PM (18 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14943655
Default Alt Text
D8070.id20855.diff (727 B)
Attached To
Mode
D8070: Fix device delete child function
Attached
Detach File
Event Timeline
Log In to Comment