diff options
author | David S. Miller <davem@davemloft.net> | 2017-01-02 12:28:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-02 12:28:00 -0500 |
commit | 94ba998b63c41e92da1b2f0cd8679e038181ef48 (patch) | |
tree | 67eed715e449fb7460f834c32edf723f2b4efa05 | |
parent | eb7903bb83cc1db31a9124d4cc8a1bddebe26e33 (diff) | |
parent | 35f432a03e41d3bf08c51ede917f94e2288fbe8c (diff) |
Merge tag 'mac80211-for-davem-2017-01-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says:
====================
A single fix to avoid loading an skb->cb pointer too early.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/mac80211/tx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 2c21b7039136..0d8b716e509e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -3287,7 +3287,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, | |||
3287 | int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); | 3287 | int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); |
3288 | int hw_headroom = sdata->local->hw.extra_tx_headroom; | 3288 | int hw_headroom = sdata->local->hw.extra_tx_headroom; |
3289 | struct ethhdr eth; | 3289 | struct ethhdr eth; |
3290 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 3290 | struct ieee80211_tx_info *info; |
3291 | struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; | 3291 | struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; |
3292 | struct ieee80211_tx_data tx; | 3292 | struct ieee80211_tx_data tx; |
3293 | ieee80211_tx_result r; | 3293 | ieee80211_tx_result r; |
@@ -3351,6 +3351,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, | |||
3351 | memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); | 3351 | memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); |
3352 | memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); | 3352 | memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); |
3353 | 3353 | ||
3354 | info = IEEE80211_SKB_CB(skb); | ||
3354 | memset(info, 0, sizeof(*info)); | 3355 | memset(info, 0, sizeof(*info)); |
3355 | info->band = fast_tx->band; | 3356 | info->band = fast_tx->band; |
3356 | info->control.vif = &sdata->vif; | 3357 | info->control.vif = &sdata->vif; |