diff mbox

[net-next] tipc: fix a link reset issue due to retransmission failures

Message ID 1427278181-29389-1-git-send-email-ying.xue@windriver.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ying Xue March 25, 2015, 10:09 a.m. UTC
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(-)

Comments

David Miller March 25, 2015, 3:46 p.m. UTC | #1
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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++;