mac80211: add comment for rx_path_lock
authorJohannes Berg <johannes.berg@intel.com>
Mon, 16 Mar 2015 08:08:20 +0000 (09:08 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 16 Mar 2015 08:08:20 +0000 (09:08 +0100)
Add a comment explaining how the RX path lock is used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c

index bdabf349c6eefa0965968b8cafa39baf2e302892..6accd61ee54b2b0f9a58f9828d8c00e98d33e236 100644 (file)
@@ -3123,6 +3123,12 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx,
                        goto rxh_next;  \
        } while (0);
 
+       /* Lock here to avoid hitting all of the data used in the RX
+        * path (e.g. key data, station data, ...) concurrently when
+        * a frame is released from the reorder buffer due to timeout
+        * from the timer, potentially concurrently with RX from the
+        * driver.
+        */
        spin_lock_bh(&rx->local->rx_path_lock);
 
        while ((skb = __skb_dequeue(frames))) {