Commit 5c091f61 authored by Johannes Berg's avatar Johannes Berg Committed by Greg Kroah-Hartman

mac80211: check skb_linearize() return value

commit 0b97a484 upstream.

The A-MSDU TX code (within TXQs) didn't always check the return value
of skb_linearize() properly, resulting in potentially passing a frag-
list SKB down to the driver even when it said it can't handle it. Fix
that.

Fixes: 6e0456b5 ("mac80211: add A-MSDU tx support")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b0e88ea4
......@@ -1330,8 +1330,12 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
spin_unlock_bh(&txqi->queue.lock);
if (skb && skb_has_frag_list(skb) &&
!ieee80211_hw_check(&local->hw, TX_FRAG_LIST))
skb_linearize(skb);
!ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) {
if (skb_linearize(skb)) {
ieee80211_free_txskb(&local->hw, skb);
return NULL;
}
}
return skb;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment