summaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-27 15:16:37 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-27 15:16:37 +0000
commit95d801c59d18de6b463d1b815180cd85ad3ca95a (patch)
treeed811fadf71d0924263634767fd26d939d0621cd /target/linux/generic
parentfe77f5d92219c04614c22fd46d1c521dfe72cd7b (diff)
kernel: properly pad the allocated headroom in skb_cow to NET_SKB_PAD
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31906 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/patches-3.3/654-avoid_skb_cow_realloc.patch3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/generic/patches-3.3/654-avoid_skb_cow_realloc.patch b/target/linux/generic/patches-3.3/654-avoid_skb_cow_realloc.patch
index dfa98198e..5b2537127 100644
--- a/target/linux/generic/patches-3.3/654-avoid_skb_cow_realloc.patch
+++ b/target/linux/generic/patches-3.3/654-avoid_skb_cow_realloc.patch
@@ -10,10 +10,11 @@
if (headroom < NET_SKB_PAD)
- headroom = NET_SKB_PAD;
- if (headroom > skb_headroom(skb))
+- delta = headroom - skb_headroom(skb);
+ alloc_headroom = NET_SKB_PAD;
+ if (headroom > skb_headroom(skb) ||
+ (cloned && alloc_headroom > skb_headroom(skb))) {
- delta = headroom - skb_headroom(skb);
++ delta = alloc_headroom - skb_headroom(skb);
+ }
if (delta || cloned)