netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] tipc: fix a link reset issue due to retransmission failures
@ 2015-03-25 10:09 Ying Xue
  2015-03-25 15:46 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ying Xue @ 2015-03-25 10:09 UTC (permalink / raw)
  To: davem; +Cc: jon.maloy, Paul.Gortmaker, tipc-discussion, netdev

When a node joins a cluster while we are transmitting a fragment
stream over the broadcast link, it's missing the preceding fragments
needed to build a meaningful message. As a result, the node has to
drop it. However, as the fragment message is not acknowledged to
its sender before it's dropped, it accidentally causes link reset
of retransmission failure on the node.

Reported-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Tested-by: Erik Hugne <erik.hugne@ericsson.com>
---
 net/tipc/bcast.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 403aee7..7935553 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -523,11 +523,13 @@ receive:
 			tipc_bclink_unlock(net);
 			tipc_node_unlock(node);
 		} else if (msg_user(msg) == MSG_FRAGMENTER) {
-			tipc_buf_append(&node->bclink.reasm_buf, &buf);
-			if (unlikely(!buf && !node->bclink.reasm_buf))
-				goto unlock;
 			tipc_bclink_lock(net);
 			bclink_accept_pkt(node, seqno);
+			tipc_buf_append(&node->bclink.reasm_buf, &buf);
+			if (unlikely(!buf && !node->bclink.reasm_buf)) {
+				tipc_bclink_unlock(net);
+				goto unlock;
+			}
 			bcl->stats.recv_fragments++;
 			if (buf) {
 				bcl->stats.recv_fragmented++;
-- 
1.7.9.5


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] tipc: fix a link reset issue due to retransmission failures
  2015-03-25 10:09 [PATCH net-next] tipc: fix a link reset issue due to retransmission failures Ying Xue
@ 2015-03-25 15:46 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-03-25 15:46 UTC (permalink / raw)
  To: ying.xue; +Cc: jon.maloy, Paul.Gortmaker, erik.hugne, netdev, tipc-discussion

From: Ying Xue <ying.xue@windriver.com>
Date: Wed, 25 Mar 2015 18:09:40 +0800

> When a node joins a cluster while we are transmitting a fragment
> stream over the broadcast link, it's missing the preceding fragments
> needed to build a meaningful message. As a result, the node has to
> drop it. However, as the fragment message is not acknowledged to
> its sender before it's dropped, it accidentally causes link reset
> of retransmission failure on the node.
> 
> Reported-by: Erik Hugne <erik.hugne@ericsson.com>
> Signed-off-by: Ying Xue <ying.xue@windriver.com>
> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
> Tested-by: Erik Hugne <erik.hugne@ericsson.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-25 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 10:09 [PATCH net-next] tipc: fix a link reset issue due to retransmission failures Ying Xue
2015-03-25 15:46 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).