Skip to contentSkip to conversation

Patch "mac80211: check skb_linearize() return value" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Oct 5, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

mac80211: check skb_linearize() return value

to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mac80211-check-skb_linearize-return-value.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 0b97a484e52cb423662eb98904aad82dafcc1f10 Mon Sep 17 00:00:00 2001

From: Johannes Berg <[email protected]>
Date: Wed, 14 Sep 2016 09:41:34 +0200
Subject: mac80211: check skb_linearize() return value

From: Johannes Berg <[email protected]>

commit 0b97a484e52cb423662eb98904aad82dafcc1f10 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 6e0456b545456 ("mac80211: add A-MSDU tx support")
---
 net/mac80211/tx.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
net/mac80211/tx.c +6 -2
@@ -1330,8 +1330,12 @@ out:
 	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;
 }

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/mac80211-check-skb_linearize-return-value.patch