]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix potentially redundant skb data copying
authorFelix Fietkau <nbd@openwrt.org>
Sat, 18 Dec 2010 18:30:50 +0000 (19:30 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 20 Dec 2010 19:52:17 +0000 (14:52 -0500)
commit854f163bb026a472499278a83bb6a1860740c336
tree3acab2f7a781ce3ed83bcd5350ac14b133dc0e45
parent099d2f2bdc29f80884909cce1a9f1f909be3c76a
mac80211: fix potentially redundant skb data copying

When an skb is shared, it needs to be duplicated, along with its data buffer.
If the skb does not have enough headroom, using skb_copy might cause the data
buffer to be copied twice (once by skb_copy and once by pskb_expand_head).
Fix this by using skb_clone initially and letting ieee80211_skb_resize sort
out the rest.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/tx.c