mac80211: sparse RCU annotations
This adds sparse RCU annotations to most of mac80211, only the mesh code remains to be done. Due the the previous patches, the annotations are pretty simple. The only thing that this actually changes is removing the RCU usage of key->sta in debugfs since this pointer isn't actually an RCU-managed pointer (it only has a single assignment done before the key even goes live). As that is otherwise harmless, I decided to make it part of this patch. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
ec034b208d
commit
40b275b69e
@@ -662,12 +662,16 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
|
||||
int tx_last_beacon, len = req->len;
|
||||
struct sk_buff *skb;
|
||||
struct ieee80211_mgmt *resp;
|
||||
struct sk_buff *presp;
|
||||
u8 *pos, *end;
|
||||
|
||||
lockdep_assert_held(&ifibss->mtx);
|
||||
|
||||
presp = rcu_dereference_protected(ifibss->presp,
|
||||
lockdep_is_held(&ifibss->mtx));
|
||||
|
||||
if (ifibss->state != IEEE80211_IBSS_MLME_JOINED ||
|
||||
len < 24 + 2 || !ifibss->presp)
|
||||
len < 24 + 2 || !presp)
|
||||
return;
|
||||
|
||||
tx_last_beacon = drv_tx_last_beacon(local);
|
||||
@@ -705,7 +709,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
|
||||
}
|
||||
|
||||
/* Reply with ProbeResp */
|
||||
skb = skb_copy(ifibss->presp, GFP_KERNEL);
|
||||
skb = skb_copy(presp, GFP_KERNEL);
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
@@ -985,7 +989,8 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
|
||||
|
||||
/* remove beacon */
|
||||
kfree(sdata->u.ibss.ie);
|
||||
skb = sdata->u.ibss.presp;
|
||||
skb = rcu_dereference_protected(sdata->u.ibss.presp,
|
||||
lockdep_is_held(&sdata->u.ibss.mtx));
|
||||
rcu_assign_pointer(sdata->u.ibss.presp, NULL);
|
||||
sdata->vif.bss_conf.ibss_joined = false;
|
||||
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED |
|
||||
|
Reference in New Issue
Block a user