diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2017-01-30 06:45:38 +0100 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2017-01-30 06:45:38 +0100 |
commit | f991bb9da142ba79b54ed0757f22e756f45e2c5a (patch) | |
tree | 0c1e5ec4de598c841b8fae187c4b1b783c1ceb02 /net/core | |
parent | eb758c8864d49f5786432ce38fd8a72bdbbd10cf (diff) | |
download | linux-f991bb9da142ba79b54ed0757f22e756f45e2c5a.tar.bz2 |
net: Drop secpath on free after gro merge.
With a followup patch, a gro merged skb can have a secpath.
So drop it before freeing or reusing the skb.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 56818f7eab2b..ef3a969477bf 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4623,6 +4623,7 @@ static gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb) case GRO_MERGED_FREE: if (NAPI_GRO_CB(skb)->free == NAPI_GRO_FREE_STOLEN_HEAD) { skb_dst_drop(skb); + secpath_reset(skb); kmem_cache_free(skbuff_head_cache, skb); } else { __kfree_skb(skb); @@ -4663,6 +4664,7 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) skb->encapsulation = 0; skb_shinfo(skb)->gso_type = 0; skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); + secpath_reset(skb); napi->skb = skb; } |