提交 5074ab89 编写于 作者: J Jon Paul Maloy 提交者: David S. Miller

tipc: mark head of reassembly buffer as non-linear

The message reassembly function does not update the 'len' and 'data_len'
fields of the head skbuff correctly when fragments are chained to it.
This may sometimes lead to obsure errors, such as fragment reordering
when we receive fragments which are cloned buffers.

This commit fixes this, by ensuring that the two fields are updated
correctly.
Suggested-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
Reviewed-by: NYing Xue <ying.xue@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ec37dcd3
......@@ -2341,6 +2341,8 @@ int tipc_link_frag_rcv(struct sk_buff **head, struct sk_buff **tail,
(*tail)->next = frag;
*tail = frag;
(*head)->truesize += frag->truesize;
(*head)->data_len += frag->len;
(*head)->len += frag->len;
}
if (fragid == LAST_FRAGMENT) {
*fbuf = *head;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册