]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: refactor function tipc_msg_reverse()
authorJon Maloy <jon.maloy@ericsson.com>
Fri, 28 Sep 2018 18:23:18 +0000 (20:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Sep 2018 18:24:22 +0000 (11:24 -0700)
commit92f594f8796b10dfaae53605a196fe3fb6a4d2bf
tree504887bd2f99020985c48601406fa1807f39b67e
parentde1c45f393bdd74e63ecf52783d12aad6ba075e0
tipc: refactor function tipc_msg_reverse()

The function tipc_msg_reverse() is reversing the header of a message
while reusing the original buffer. We have seen at several occasions
that this may have unfortunate side effects when the buffer to be
reversed is a clone.

In one of the following commits we will again need to reverse cloned
buffers, so this is the right time to permanently eliminate this
problem. In this commit we let the said function always consume the
original buffer and replace it with a new one when applicable.

Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/msg.c