]> Pileus Git - ~andy/linux/commitdiff
sctp: fix oops while removed transport still using as retran path
authorWei Yongjun <yjwei@cn.fujitsu.com>
Tue, 12 Apr 2011 15:22:22 +0000 (15:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2011 02:33:51 +0000 (19:33 -0700)
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 <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/associola.c

index 922fdd7eb57335e41f7112711210273c6522ec5a..1a21c571aa034fc90db2a38d4606681af03f0669 100644 (file)
@@ -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;