lkml.org 
[lkml]   [2020]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net: Set trailer iff skb1 is the last one
Date
Set trailer iff skb1 is the skbuff where the tailbits space begins.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
net/core/skbuff.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 0b24aed04060..18ed56316e56 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4488,8 +4488,9 @@ int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer)
skb1 = skb2;
}
elt++;
- *trailer = skb1;
skb_p = &skb1->next;
+ if (!*skb_p)
+ *trailer = skb1;
}

return elt;
--
2.19.1
\
 
 \ /
  Last update: 2020-08-27 17:23    [W:0.024 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site