diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-05-19 15:40:21 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-05-19 15:46:21 +0200 |
commit | 22d3a3c829fa9ecdb493d1f1f2838d543f8d86a3 (patch) | |
tree | d8961aabf48478add145e56acc0683fec328f9b1 /net/mac80211/rx.c | |
parent | 47b4e1fc4972cc43a19121bc2608a60aef3bf216 (diff) | |
download | linux-22d3a3c829fa9ecdb493d1f1f2838d543f8d86a3.tar.bz2 |
mac80211: don't use napi_gro_receive() outside NAPI context
No matter how the driver manages its NAPI context, there's no way
sending frames to it from a timer can be correct, since it would
corrupt the internal GRO lists.
To avoid that, always use the non-NAPI path when releasing frames
from the timer.
Cc: stable@vger.kernel.org
Reported-by: Jean Trivelly <jean.trivelly@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 260eed45b6d2..5793f75c5ffd 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2121,7 +2121,8 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx) /* deliver to local stack */ skb->protocol = eth_type_trans(skb, dev); memset(skb->cb, 0, sizeof(skb->cb)); - if (rx->local->napi) + if (!(rx->flags & IEEE80211_RX_REORDER_TIMER) && + rx->local->napi) napi_gro_receive(rx->local->napi, skb); else netif_receive_skb(skb); @@ -3231,7 +3232,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) /* This is OK -- must be QoS data frame */ .security_idx = tid, .seqno_idx = tid, - .flags = 0, + .flags = IEEE80211_RX_REORDER_TIMER, }; struct tid_ampdu_rx *tid_agg_rx; |