All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: lksctp <linux-sctp@vger.kernel.org>
Subject: [PATCH] sctp: fix oops while removed transport still using as retran
Date: Wed, 13 Apr 2011 01:22:22 +0000	[thread overview]
Message-ID: <4DA4FACE.5060706@cn.fujitsu.com> (raw)
In-Reply-To: <4DA4FA70.50506@cn.fujitsu.com>

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>
---
 net/sctp/associola.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 922fdd7..1a21c57 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;
 
-- 
1.6.5.2



WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: lksctp <linux-sctp@vger.kernel.org>
Subject: [PATCH] sctp: fix oops while removed transport still using as retran path
Date: Wed, 13 Apr 2011 09:22:22 +0800	[thread overview]
Message-ID: <4DA4FACE.5060706@cn.fujitsu.com> (raw)
In-Reply-To: <4DA4FA70.50506@cn.fujitsu.com>

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>
---
 net/sctp/associola.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 922fdd7..1a21c57 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;
 
-- 
1.6.5.2



  reply	other threads:[~2011-04-13  1:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  1:20 [PATCH] sctp: fix oops when updating retransmit path with DEBUG on Wei Yongjun
2011-04-13  1:20 ` Wei Yongjun
2011-04-13  1:22 ` Wei Yongjun [this message]
2011-04-13  1:22   ` [PATCH] sctp: fix oops while removed transport still using as retran path Wei Yongjun
2011-04-13  2:34   ` [PATCH] sctp: fix oops while removed transport still using as David Miller
2011-04-13  2:34     ` [PATCH] sctp: fix oops while removed transport still using as retran path David Miller
2011-04-13  2:34 ` [PATCH] sctp: fix oops when updating retransmit path with David Miller
2011-04-13  2:34   ` [PATCH] sctp: fix oops when updating retransmit path with DEBUG on David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DA4FACE.5060706@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.