summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-02 18:28:00 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-02 18:28:00 +0100
commit94ba998b63c41e92da1b2f0cd8679e038181ef48 (patch)
tree67eed715e449fb7460f834c32edf723f2b4efa05
parentMerge branch 'l2tp-socket-lookup-fixes' (diff)
parentmac80211: initialize fast-xmit 'info' later (diff)
downloadlinux-94ba998b63c41e92da1b2f0cd8679e038181ef48.tar.xz
linux-94ba998b63c41e92da1b2f0cd8679e038181ef48.zip
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.c3
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,
int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
int hw_headroom = sdata->local->hw.extra_tx_headroom;
struct ethhdr eth;
- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+ struct ieee80211_tx_info *info;
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
struct ieee80211_tx_data tx;
ieee80211_tx_result r;
@@ -3351,6 +3351,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN);
memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN);
+ info = IEEE80211_SKB_CB(skb);
memset(info, 0, sizeof(*info));
info->band = fast_tx->band;
info->control.vif = &sdata->vif;