summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/bluetooth
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-11-30 22:28:50 +0000
committermlaier <mlaier@FreeBSD.org>2004-11-30 22:28:50 +0000
commitea0fd1c0832b6eab6bd5fefdb7bdf0ecc2a8cbfc (patch)
tree6e2b676b526d669f63da6f72fd588dff176a3ccf /sys/netgraph/bluetooth
parentc701aac0d68d8ed97ee0b295d672716d1e7c3dc2 (diff)
downloadFreeBSD-src-ea0fd1c0832b6eab6bd5fefdb7bdf0ecc2a8cbfc.zip
FreeBSD-src-ea0fd1c0832b6eab6bd5fefdb7bdf0ecc2a8cbfc.tar.gz
Move ng_socket and ng_btsocket initialization to SI_SUB_PROTO_DOMAIN as they
call net_add_domain(). Calling this function too early (or late) breaks assertations about the global domains list. Actually it should be forbidden to call net_add_domain() outside of SI_SUB_PROTO_DOMAIN completely as there are many places where we traverse the domains list unprotected, but for now we allow late calls (mostly to support netgraph). In order to really fix this we have to lock the domains list in all places or find another way to ensure that we can safely walk the list while another thread might be adding a new domain. Spotted by: se Reviewed by: julian, glebius PR: kern/73321 (partly)
Diffstat (limited to 'sys/netgraph/bluetooth')
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket.c b/sys/netgraph/bluetooth/socket/ng_btsocket.c
index e956315..21ae63c 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket.c
@@ -234,7 +234,8 @@ static moduledata_t ng_btsocket_mod = {
NULL
};
-DECLARE_MODULE(ng_btsocket, ng_btsocket_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+DECLARE_MODULE(ng_btsocket, ng_btsocket_mod, SI_SUB_PROTO_DOMAIN,
+ SI_ORDER_ANY);
MODULE_VERSION(ng_btsocket, NG_BLUETOOTH_VERSION);
MODULE_DEPEND(ng_btsocket, ng_bluetooth, NG_BLUETOOTH_VERSION,
NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION);
OpenPOWER on IntegriCloud