summaryrefslogtreecommitdiff
path: root/net/tipc/msg.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-02 08:47:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-02 08:47:35 +0100
commit48a3d90adafc9ed92d19c93d011f17ec9001cc34 (patch)
tree868f62da2306ddabd6eca57eb6ea2a18ac18995f /net/tipc/msg.c
parent3f7566f4947834db9b36aeb8b308e91448ba74fc (diff)
parent3cea11cd5e3b00d91caf0b4730194039b45c5891 (diff)
Merge 5.10-rc2 into char-misc-next
We need the fixes/changes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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) {