Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142416802
D47174.id145105.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
784 B
Referenced Files
None
Subscribers
None
D47174.id145105.diff
View Options
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
@@ -2538,10 +2538,7 @@
else if (error != 0)
return (error);
- CURVNET_SET_QUIET(vnet0);
- error = device_attach(dev);
- CURVNET_RESTORE();
- return error;
+ return (device_attach(dev));
}
/**
@@ -2577,6 +2574,7 @@
return (ENXIO);
}
+ CURVNET_SET_QUIET(vnet0);
device_sysctl_init(dev);
if (!device_is_quiet(dev))
device_print_child(dev->parent, dev);
@@ -2609,8 +2607,10 @@
KASSERT(dev->busy == 0, ("attach failed but busy"));
dev->state = DS_NOTPRESENT;
}
+ CURVNET_RESTORE();
return (error);
}
+ CURVNET_RESTORE();
dev->flags |= DF_ATTACHED_ONCE;
/*
* We only need the low bits of this time, but ranges from tens to thousands
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 20, 7:21 PM (7 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27771424
Default Alt Text
D47174.id145105.diff (784 B)
Attached To
Mode
D47174: bus: Set the current VNET in device_attach()
Attached
Detach File
Event Timeline
Log In to Comment