• Jon Maloy's avatar
    tipc: refactor function tipc_msg_reverse() · 5cbdbd1a
    Jon Maloy authored
    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: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5cbdbd1a
msg.c 18.7 KB