From 4885041d59e114c3fa2f900714b66c3c001a8550 Mon Sep 17 00:00:00 2001 From: czom Date: Mon, 23 Apr 2018 12:43:00 +0800 Subject: [PATCH 1/3] Update skbuff.c logic error! --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index fab4599ba8b261..514f2f84ec18b4 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1165,7 +1165,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, } else { skb_free_head(skb); } - off = (data + nhead) - skb->head; + off = (skb->data - skb->head) + nhead; skb->head = data; skb->head_frag = 0; From 51451c2b87db8178bb130eba1e51c634e5e3bb13 Mon Sep 17 00:00:00 2001 From: czom Date: Mon, 23 Apr 2018 22:24:38 +0800 Subject: [PATCH 2/3] Update skbuff.c --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 514f2f84ec18b4..85c67a01d3682f 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1169,7 +1169,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, skb->head = data; skb->head_frag = 0; - skb->data += off; + skb->data = data + off; #ifdef NET_SKBUFF_DATA_USES_OFFSET skb->end = size; off = nhead; From 757d15e21d9b304ee2c9fc0a8239458dcd011047 Mon Sep 17 00:00:00 2001 From: czom Date: Mon, 23 Apr 2018 22:26:01 +0800 Subject: [PATCH 3/3] Update skbuff.c --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 85c67a01d3682f..dd85d2e287a8bf 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1169,7 +1169,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, skb->head = data; skb->head_frag = 0; - skb->data = data + off; + skb->data = skb->head + off; #ifdef NET_SKBUFF_DATA_USES_OFFSET skb->end = size; off = nhead;