diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/sta_info.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 211c475f73c6..bd11753c1525 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -632,9 +632,6 @@ static int __must_check __sta_info_destroy(struct sta_info *sta) | |||
632 | * may mean it is removed from hardware which requires that | 632 | * may mean it is removed from hardware which requires that |
633 | * the key->sta pointer is still valid, so flush the key todo | 633 | * the key->sta pointer is still valid, so flush the key todo |
634 | * list here. | 634 | * list here. |
635 | * | ||
636 | * ieee80211_key_todo() will synchronize_rcu() so after this | ||
637 | * nothing can reference this sta struct any more. | ||
638 | */ | 635 | */ |
639 | ieee80211_key_todo(); | 636 | ieee80211_key_todo(); |
640 | 637 | ||
@@ -666,11 +663,17 @@ static int __must_check __sta_info_destroy(struct sta_info *sta) | |||
666 | sdata = sta->sdata; | 663 | sdata = sta->sdata; |
667 | } | 664 | } |
668 | 665 | ||
666 | /* | ||
667 | * At this point, after we wait for an RCU grace period, | ||
668 | * neither mac80211 nor the driver can reference this | ||
669 | * sta struct any more except by still existing timers | ||
670 | * associated with this station that we clean up below. | ||
671 | */ | ||
672 | synchronize_rcu(); | ||
673 | |||
669 | #ifdef CONFIG_MAC80211_MESH | 674 | #ifdef CONFIG_MAC80211_MESH |
670 | if (ieee80211_vif_is_mesh(&sdata->vif)) { | 675 | if (ieee80211_vif_is_mesh(&sdata->vif)) |
671 | mesh_accept_plinks_update(sdata); | 676 | mesh_accept_plinks_update(sdata); |
672 | del_timer(&sta->plink_timer); | ||
673 | } | ||
674 | #endif | 677 | #endif |
675 | 678 | ||
676 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 679 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |