sctp: do not return the transmit err back to sctp_sendmsg
authorXin Long <lucien.xin@gmail.com>
Tue, 13 Sep 2016 18:04:19 +0000 (02:04 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:50:49 +0000 (03:50 +0000)
commitfdb733e39efe43a3b26029955d9762cf4bd37286
tree038a8f819a7e6784520e5176984829b3233485b6
parent675e634a9786ce753f58afd8f84dcdd637c29f2e
sctp: do not return the transmit err back to sctp_sendmsg

commit 66388f2c08dfa38071f9eceae7bb29060d9be9aa upstream.

Once a chunk is enqueued successfully, sctp queues can take care of it.
Even if it is failed to transmit (like because of nomem), it should be
put into retransmit queue.

If sctp report this error to users, it confuses them, they may resend
that msg, but actually in kernel sctp stack is in charge of retransmit
it already.

Besides, this error probably is not from the failure of transmitting
current msg, but transmitting or retransmitting another msg's chunks,
as sctp_outq_flush just tries to send out all transports' chunks.

This patch is to make sctp_cmd_send_msg return avoid, and not return the
transmit err back to sctp_sendmsg

Fixes: 8b570dc9f7b6 ("sctp: only drop the reference on the datamsg after sending a msg")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: no gfp flags parameter]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/sctp/sm_sideeffect.c