]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: reassign pointers after skb reallocation / linearization
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Thu, 24 Aug 2017 14:31:23 +0000 (16:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Aug 2017 04:54:34 +0000 (21:54 -0700)
commit5d9b20793388a8d79ba7bcddb347c817a065d3ae
tree0e5ebe511f6f2e52e852c90dedcc24461515cfee
parentabd4f4af7159d92b425765b83d43340baf69a010
tipc: reassign pointers after skb reallocation / linearization

In tipc_msg_reverse(), we assign skb attributes to local pointers
in stack at startup. This is followed by skb_linearize() and for
cloned buffers we perform skb relocation using pskb_expand_head().
Both these methods may update the skb attributes and thus making
the pointers incorrect.

In this commit, we fix this error by ensuring that the pointers
are re-assigned after any of these skb operations.

Fixes: 07a6334366387 ("tipc: let function tipc_msg_reverse() expand header
when needed")
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/msg.c