diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-12-15 14:51:17 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-12-15 14:51:17 +0100 |
commit | e6d111cd909551cec5902358db1e25dcaa8c86bb (patch) | |
tree | 99673aec563c76a1a4d7ca2d31b90b47549ae40b /net/tipc/msg.c | |
parent | 1dcb97e485420a25461cc44d43f987c8bbf50e7a (diff) | |
parent | 07cc49f66973f49a391c91bf4b158fa0f2562ca8 (diff) |
Merge tag 'v4.1.15' into toradex_vf_4.1-nextColibri_VF_LinuxImageV2.5Beta3_20151215
This is the 4.1.15 stable release
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r-- | net/tipc/msg.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c index c3e96e815418..e9333147d6f1 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c @@ -121,7 +121,7 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf) { struct sk_buff *head = *headbuf; struct sk_buff *frag = *buf; - struct sk_buff *tail; + struct sk_buff *tail = NULL; struct tipc_msg *msg; u32 fragid; int delta; @@ -141,9 +141,15 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf) if (unlikely(skb_unclone(frag, GFP_ATOMIC))) goto err; head = *headbuf = frag; - skb_frag_list_init(head); - TIPC_SKB_CB(head)->tail = NULL; *buf = NULL; + 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; } |