Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102657446
D43512.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D43512.diff
View Options
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -171,6 +171,10 @@
void
ieee80211_node_latevattach(struct ieee80211vap *vap)
{
+
+ /* XXX should ieee80211_vap_attach(), our only caller hold the lock? */
+ IEEE80211_UNLOCK_ASSERT(vap->iv_ic);
+
if (vap->iv_opmode == IEEE80211_M_HOSTAP) {
/* XXX should we allow max aid to be zero? */
if (vap->iv_max_aid < IEEE80211_AID_MIN) {
@@ -191,7 +195,9 @@
}
}
+ IEEE80211_LOCK(vap->iv_ic);
ieee80211_reset_bss(vap);
+ IEEE80211_UNLOCK(vap->iv_ic);
vap->iv_auth = ieee80211_authenticator_get(vap->iv_bss->ni_authmode);
}
@@ -201,11 +207,16 @@
{
struct ieee80211com *ic = vap->iv_ic;
+ /* XXX should ieee80211_vap_detach(), our only caller hold the lock? */
+ IEEE80211_UNLOCK_ASSERT(vap->iv_ic);
+
ieee80211_node_table_reset(&ic->ic_sta, vap);
+ IEEE80211_LOCK(ic);
if (vap->iv_bss != NULL) {
ieee80211_free_node(vap->iv_bss);
vap->iv_update_bss(vap, NULL);
}
+ IEEE80211_UNLOCK(ic);
if (vap->iv_aid_bitmap != NULL) {
IEEE80211_FREE(vap->iv_aid_bitmap, M_80211_NODE);
vap->iv_aid_bitmap = NULL;
@@ -455,6 +466,8 @@
struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_node *ni, *obss;
+ IEEE80211_LOCK_ASSERT(ic);
+
ieee80211_node_table_reset(&ic->ic_sta, vap);
/* XXX multi-bss: wrong */
ieee80211_vap_reset_erp(vap);
@@ -854,7 +867,9 @@
/*
* Committed to selbs, setup state.
*/
+ IEEE80211_LOCK(ic); /* XXX may recurse here, check callers. */
obss = vap->iv_update_bss(vap, selbs); /* NB: caller assumed to bump refcnt */
+ IEEE80211_UNLOCK(ic);
/*
* Check if old+new node have the same address in which
* case we can reassociate when operating in sta mode.
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -826,6 +826,8 @@
{
struct ieee80211_node *obss;
+ IEEE80211_LOCK_ASSERT(vap->iv_ic);
+
obss = vap->iv_bss;
vap->iv_bss = ni;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 11:03 AM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14657631
Default Alt Text
D43512.diff (2 KB)
Attached To
Mode
D43512: net80211: make sure calls to (*iv_update_bss)() are locked
Attached
Detach File
Event Timeline
Log In to Comment