diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-12-15 11:03:08 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-12-18 13:18:30 +0100 |
commit | fca1279f090b8e38eadb95c3914d51e544142e74 (patch) | |
tree | 5ff011f1034cbbc4d41a33ba737421fd5cda1beb /include/net/mac80211.h | |
parent | 233e98dc9c3009943aa34d58925d94ac9330e17b (diff) | |
download | linux-fca1279f090b8e38eadb95c3914d51e544142e74.tar.bz2 |
mac80211: document RCU requirements for ieee80211_tx_dequeue()
In the iwlwifi conversion, we sometimes call this from outside
of the wake_tx_queue() method, and in those cases must be in an
RCU critical section. Document this requirement.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 6f19cf48dd6a..aecbdf38b4c2 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -6103,6 +6103,14 @@ void ieee80211_unreserve_tid(struct ieee80211_sta *sta, u8 tid); * @txq: pointer obtained from station or virtual interface * * Returns the skb if successful, %NULL if no frame was available. + * + * Note that this must be called in an rcu_read_lock() critical section, + * which can only be released after the SKB was handled. Some pointers in + * skb->cb, e.g. the key pointer, are protected by by RCU and thus the + * critical section must persist not just for the duration of this call + * but for the duration of the frame handling. + * However, also note that while in the wake_tx_queue() method, + * rcu_read_lock() is already held. */ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, struct ieee80211_txq *txq); |