diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-12-17 08:48:38 -0800 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-12-17 08:48:38 -0800 |
commit | 906d9eadd3b6698fa6ceb9bcdf41da6aa56d0a24 (patch) | |
tree | b258d06410e154ce58d9b0d16ffba0834ff2a1ac /net/tipc/msg.c | |
parent | d3d3a134d75d28034b950bc0b6682ba0be976f37 (diff) | |
parent | 9f41e6b222c4a04c7b46068df82842a6188b4a57 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-15.12-rtlinux-linaro-lsk-v4.1-rt
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; } |