From: Wei Yongjun Date: Tue, 12 Apr 2011 15:22:22 +0000 (+0000) Subject: sctp: fix oops while removed transport still using as retran path X-Git-Tag: firefly_0821_release~7613^2~1428^2~80 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9494c7c5774d64a84a269aad38c153c4dbff97e6;p=firefly-linux-kernel-4.4.55.git sctp: fix oops while removed transport still using as retran path Since we can not update retran path to unconfirmed transports, when we remove a peer, the retran path may not be update if the other transports are all unconfirmed, and we will still using the removed transport as the retran path. This may cause panic if retrasnmit happen. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 922fdd7eb573..1a21c571aa03 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -569,6 +569,8 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc, sctp_assoc_set_primary(asoc, transport); if (asoc->peer.active_path == peer) asoc->peer.active_path = transport; + if (asoc->peer.retran_path == peer) + asoc->peer.retran_path = transport; if (asoc->peer.last_data_from == peer) asoc->peer.last_data_from = transport;