mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-27 16:31:05 +02:00
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
This commit is contained in:
parent
fe77f5d922
commit
95d801c59d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user