Skip to content

Commit

Permalink
mac80211: fix the skb cloned check in the tx path
Browse files Browse the repository at this point in the history
Using skb_header_cloned to check if it's safe to write to the skb is not
enough - mac80211 also touches the tailroom of the skb.
Initially this check was only used to increase a counter, however this
commit changed the code to also skip skb data reallocation if no extra
head/tailroom was needed:

commit 4cd06a3
mac80211: skip unnecessary pskb_expand_head calls

It added a regression at least with iwl3945, which is fixed by this patch.

Reported-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Tested-by: Dmitry Torokhov <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
Felix Fietkau authored and linvjw committed Feb 7, 2011
1 parent 3dd823e commit fc7c976
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
skb_orphan(skb);
}

if (skb_header_cloned(skb))
if (skb_cloned(skb))
I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
else if (head_need || tail_need)
I802_DEBUG_INC(local->tx_expand_skb_head);
Expand Down

0 comments on commit fc7c976

Please sign in to comment.