sctp: fix oops when updating retransmit path with DEBUG on
Subsystems (3)
PATCH 1/1 sctp: fix oops when updating retransmit path with DEBUG on
From: Vlad Yasevich <[email protected]>
commit fbdf501c9374966a56829ecca3a7f25d2b49a305
sctp: Do no select unconfirmed transports for retransmissions
Introduced the initial falt.
commit d598b166ced20d9b9281ea3527c0e18405ddb803
sctp: Make sure we always return valid retransmit path
Solved the problem, but forgot to change the DEBUG statement. Thus it was still possible to dereference a NULL pointer.
--- net/sctp/associola.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/sctp/associola.c +2 -0
@@ -1323,6 +1323,8 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)if (t) asoc->peer.retran_path = t; +else + t = asoc->peer.retran_path; SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association" " %p addr: ",
Signature · 1 line
1.6.5.2
PATCH 1/1 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.
--- net/sctp/associola.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/sctp/associola.c +2 -0
@@ -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;
Signature · 1 line
1.6.5.2
Re: [PATCH] sctp: fix oops while removed transport still using as retran path
From: Wei Yongjun <[email protected]>
Date: Wed, 13 Apr 2011 09:22:22 +0800
Quoted 7 lines
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 <[email protected]>
Applied.
From: Wei Yongjun <[email protected]>
Date: Wed, 13 Apr 2011 09:20:48 +0800
Quoted 7 lines
From: Vlad Yasevich <[email protected]>
commit
fbdf501c9374966a56829ecca3a7f25d2b49a305
sctp: Do no select unconfirmed transports for retransmissionsIntroduced the initial falt.
Quoted 8 lines
commit
d598b166ced20d9b9281ea3527c0e18405ddb803
sctp: Make sure we always return valid retransmit pathSolved the problem, but forgot to change the DEBUG statement. Thus it was still possible to dereference a NULL pointer.
Signed-off-by Wei Yongjun <[email protected]>Signed-off-by Vlad Yasevich <[email protected]>
Applied.