summaryrefslogtreecommitdiffstats
path: root/net/tipc/msg.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-06-23 02:07:48 +0200
committerDave Airlie <airlied@redhat.com>2021-06-23 02:07:48 +0200
commitf45fbbb6d5cff29ddfc708676ec1c2496eed3a07 (patch)
tree5496fee9f6b10da368aa49b03612061156e42d2f /net/tipc/msg.c
parentMerge tag 'amd-drm-next-5.14-2021-06-16' of https://gitlab.freedesktop.org/ag... (diff)
parentLinux 5.13-rc7 (diff)
downloadlinux-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.tar.xz
linux-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.zip
Backmerge tag 'v5.13-rc7' into drm-next
Backmerge Linux 5.13-rc7 to make some pulls from later bases apply, and to bake in the conflicts so far.
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r--net/tipc/msg.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 3f0a25345a7c..ce6ab54822d8 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -149,18 +149,13 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)
if (unlikely(head))
goto err;
*buf = NULL;
+ if (skb_has_frag_list(frag) && __skb_linearize(frag))
+ goto err;
frag = skb_unshare(frag, GFP_ATOMIC);
if (unlikely(!frag))
goto err;
head = *headbuf = frag;
TIPC_SKB_CB(head)->tail = NULL;
- if (skb_is_nonlinear(head)) {
- skb_walk_frags(head, tail) {
- TIPC_SKB_CB(head)->tail = tail;
- }
- } else {
- skb_frag_list_init(head);
- }
return 0;
}