Unverified Commit d246e7fa authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5694 tipc: skb_linearize the head skb when reassembling msgs

parents bca07979 8dc154b3
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -141,18 +141,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;
	}