kernel: properly pad the allocated headroom in skb_cow to NET_SKB_PAD
SVN-Revision: 31906
This commit is contained in:
parent
0b8c1c8dfb
commit
51bc47ce7c
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue