aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 1287161e9424..514466efc25c 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -854,6 +854,7 @@ int tipc_link_xmit(struct net *net, struct sk_buff_head *list, u32 dnode,
854 if (link) 854 if (link)
855 rc = __tipc_link_xmit(net, link, list); 855 rc = __tipc_link_xmit(net, link, list);
856 tipc_node_unlock(node); 856 tipc_node_unlock(node);
857 tipc_node_put(node);
857 } 858 }
858 if (link) 859 if (link)
859 return rc; 860 return rc;
@@ -980,7 +981,6 @@ static void link_retransmit_failure(struct tipc_link *l_ptr,
980 (unsigned long) TIPC_SKB_CB(buf)->handle); 981 (unsigned long) TIPC_SKB_CB(buf)->handle);
981 982
982 n_ptr = tipc_bclink_retransmit_to(net); 983 n_ptr = tipc_bclink_retransmit_to(net);
983 tipc_node_lock(n_ptr);
984 984
985 tipc_addr_string_fill(addr_string, n_ptr->addr); 985 tipc_addr_string_fill(addr_string, n_ptr->addr);
986 pr_info("Broadcast link info for %s\n", addr_string); 986 pr_info("Broadcast link info for %s\n", addr_string);
@@ -992,9 +992,7 @@ static void link_retransmit_failure(struct tipc_link *l_ptr,
992 n_ptr->bclink.oos_state, 992 n_ptr->bclink.oos_state,
993 n_ptr->bclink.last_sent); 993 n_ptr->bclink.last_sent);
994 994
995 tipc_node_unlock(n_ptr); 995 n_ptr->action_flags |= TIPC_BCAST_RESET;
996
997 tipc_bclink_set_flags(net, TIPC_BCLINK_RESET);
998 l_ptr->stale_count = 0; 996 l_ptr->stale_count = 0;
999 } 997 }
1000} 998}
@@ -1119,8 +1117,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b_ptr)
1119 n_ptr = tipc_node_find(net, msg_prevnode(msg)); 1117 n_ptr = tipc_node_find(net, msg_prevnode(msg));
1120 if (unlikely(!n_ptr)) 1118 if (unlikely(!n_ptr))
1121 goto discard; 1119 goto discard;
1122 tipc_node_lock(n_ptr);
1123 1120
1121 tipc_node_lock(n_ptr);
1124 /* Locate unicast link endpoint that should handle message */ 1122 /* Locate unicast link endpoint that should handle message */
1125 l_ptr = n_ptr->links[b_ptr->identity]; 1123 l_ptr = n_ptr->links[b_ptr->identity];
1126 if (unlikely(!l_ptr)) 1124 if (unlikely(!l_ptr))
@@ -1208,6 +1206,7 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b_ptr)
1208 skb = NULL; 1206 skb = NULL;
1209unlock: 1207unlock:
1210 tipc_node_unlock(n_ptr); 1208 tipc_node_unlock(n_ptr);
1209 tipc_node_put(n_ptr);
1211discard: 1210discard:
1212 if (unlikely(skb)) 1211 if (unlikely(skb))
1213 kfree_skb(skb); 1212 kfree_skb(skb);
@@ -2239,7 +2238,6 @@ int tipc_nl_link_dump(struct sk_buff *skb, struct netlink_callback *cb)
2239 msg.seq = cb->nlh->nlmsg_seq; 2238 msg.seq = cb->nlh->nlmsg_seq;
2240 2239
2241 rcu_read_lock(); 2240 rcu_read_lock();
2242
2243 if (prev_node) { 2241 if (prev_node) {
2244 node = tipc_node_find(net, prev_node); 2242 node = tipc_node_find(net, prev_node);
2245 if (!node) { 2243 if (!node) {
@@ -2252,6 +2250,7 @@ int tipc_nl_link_dump(struct sk_buff *skb, struct netlink_callback *cb)
2252 cb->prev_seq = 1; 2250 cb->prev_seq = 1;
2253 goto out; 2251 goto out;
2254 } 2252 }
2253 tipc_node_put(node);
2255 2254
2256 list_for_each_entry_continue_rcu(node, &tn->node_list, 2255 list_for_each_entry_continue_rcu(node, &tn->node_list,
2257 list) { 2256 list) {
@@ -2259,6 +2258,7 @@ int tipc_nl_link_dump(struct sk_buff *skb, struct netlink_callback *cb)
2259 err = __tipc_nl_add_node_links(net, &msg, node, 2258 err = __tipc_nl_add_node_links(net, &msg, node,
2260 &prev_link); 2259 &prev_link);
2261 tipc_node_unlock(node); 2260 tipc_node_unlock(node);
2261 tipc_node_put(node);
2262 if (err) 2262 if (err)
2263 goto out; 2263 goto out;
2264 2264