• Xin Long's avatar
    sctp: not return ENOMEM err back in sctp_packet_transmit · 41001faf
    Xin Long authored
    As David and Marcelo's suggestion, ENOMEM err shouldn't return back to
    user in transmit path. Instead, sctp's retransmit would take care of
    the chunks that fail to send because of ENOMEM.
    
    This patch is only to do some release job when alloc_skb fails, not to
    return ENOMEM back any more.
    
    Besides, it also cleans up sctp_packet_transmit's err path, and fixes
    some issues in err path:
    
     - It didn't free the head skb in nomem: path.
     - No need to check nskb in no_route: path.
     - It should goto err: path if alloc_skb fails for head.
     - Not all the NOMEMs should free nskb.
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    41001faf
output.c 26.5 KB