]> 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)
commit30f606a571059bbce6b29261c67f9ee82e428f37
tree504887bd2f99020985c48601406fa1807f39b67e
parentd93d19ae1e7dd9198cc76fad148ed4339f6281b3
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