From: Felix Fietkau Date: Sun, 27 May 2012 15:16:37 +0000 (+0000) Subject: kernel: properly pad the allocated headroom in skb_cow to NET_SKB_PAD X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=782e68bf01b8bca58e6e792979523ce297724ca9;p=openwrt%2Fsvn-archive%2Farchive.git kernel: properly pad the allocated headroom in skb_cow to NET_SKB_PAD SVN-Revision: 31906 --- 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 dfa98198ed..5b2537127f 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)