summaryrefslogtreecommitdiff
path: root/net/tipc/msg.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-11-17 22:23:05 +0100
committerLinus Walleij <linus.walleij@linaro.org>2020-11-17 22:23:05 +0100
commitad9a72f9c6fd3998f0080701f1cc1f43a4317b7c (patch)
treedd53a560a1523f5dcd9823b29ae92bdcc0b7da4d /net/tipc/msg.c
parentb9bf97105f4b9adc32604d24072147b242564fb3 (diff)
parent09162bc32c880a791c6c0668ce0745cf7958f576 (diff)
Merge tag 'v5.10-rc4' into devel
Linux 5.10-rc4
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r--net/tipc/msg.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 2a78aa701572..32c79c59052b 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -150,12 +150,11 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)
if (fragid == FIRST_FRAGMENT) {
if (unlikely(head))
goto err;
- if (skb_cloned(frag))
- frag = skb_copy(frag, GFP_ATOMIC);
+ *buf = NULL;
+ frag = skb_unshare(frag, GFP_ATOMIC);
if (unlikely(!frag))
goto err;
head = *headbuf = frag;
- *buf = NULL;
TIPC_SKB_CB(head)->tail = NULL;
if (skb_is_nonlinear(head)) {
skb_walk_frags(head, tail) {