Commit ff36c646 authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

Old bug in skbuff.c, found by someone, but was lost.

In __pskb_pull_tail, pskb_expand_head return value test
was inverted.
parent fcb1fee4
...@@ -748,7 +748,7 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc) ...@@ -748,7 +748,7 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc)
if (skb_cloned(skb)) { if (skb_cloned(skb)) {
if (!realloc) if (!realloc)
BUG(); BUG();
if (!pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
return -ENOMEM; return -ENOMEM;
} }
if (len <= offset) { if (len <= offset) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment