aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 19:09:11 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 19:09:11 -0400
commitcec4de302c5ff2c5eb3bfcb0c4845a095f5149b9 (patch)
treeda7eeaae52d6c9a5842db0cebf669476c2163f91 /net/tipc/node.c
parent95773dc0862717ab9612d69bc07d0386bd104603 (diff)
parent4233cfe6ec4683497d7318f55ce7617e97f2e610 (diff)
Merge gitolite.kernel.org:/pub/scm/linux/kernel/git/davem/net
David writes: "Networking fixes: 1) Prefix length validation in xfrm layer, from Steffen Klassert. 2) TX status reporting fix in mac80211, from Andrei Otcheretianski. 3) Fix hangs due to TX_DROP in mac80211, from Bob Copeland. 4) Fix DMA error regression in b43, from Larry Finger. 5) Add input validation to xenvif_set_hash_mapping(), from Jan Beulich. 6) SMMU unmapping fix in hns driver, from Yunsheng Lin. 7) Bluetooh crash in unpairing on SMP, from Matias Karhumaa. 8) WoL handling fixes in the phy layer, from Heiner Kallweit. 9) Fix deadlock in bonding, from Mahesh Bandewar. 10) Fill ttl inherit infor in vxlan driver, from Hangbin Liu. 11) Fix TX timeouts during netpoll, from Michael Chan. 12) RXRPC layer fixes from David Howells. 13) Another batch of ndo_poll_controller() removals to deal with excessive resource consumption during load. From Eric Dumazet. 14) Fix a specific TIPC failure secnario, from LUU Duc Canh. 15) Really disable clocks in r8169 during suspend so that low power states can actually be reached. 16) Fix SYN backlog lockdep issue in tcp and dccp, from Eric Dumazet. 17) Fix RCU locking in netpoll SKB send, which shows up in bonding, from Dave Jones. 18) Fix TX stalls in r8169, from Heiner Kallweit. 19) Fix locksup in nfp due to control message storms, from Jakub Kicinski. 20) Various rmnet bug fixes from Subash Abhinov Kasiviswanathan and Sean Tranchetti. 21) Fix use after free in ip_cmsg_recv_dstaddr(), from Eric Dumazet." * gitolite.kernel.org:/pub/scm/linux/kernel/git/davem/net: (122 commits) ixgbe: check return value of napi_complete_done() sctp: fix fall-through annotation r8169: always autoneg on resume ipv4: fix use-after-free in ip_cmsg_recv_dstaddr() net: qualcomm: rmnet: Fix incorrect allocation flag in receive path net: qualcomm: rmnet: Fix incorrect allocation flag in transmit net: qualcomm: rmnet: Skip processing loopback packets net: systemport: Fix wake-up interrupt race during resume rtnl: limit IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES to 4096 bonding: fix warning message inet: make sure to grab rcu_read_lock before using ireq->ireq_opt nfp: avoid soft lockups under control message storm declance: Fix continuation with the adapter identification message net: fec: fix rare tx timeout r8169: fix network stalls due to missing bit TXCFG_AUTO_FIFO tun: napi flags belong to tfile tun: initialize napi_mutex unconditionally tun: remove unused parameters bond: take rcu lock in netpoll_send_skb_on_dev rtnetlink: Fail dump if target netnsid is invalid ...
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 68014f1b6976..2afc4f8c37a7 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -111,6 +111,7 @@ struct tipc_node {
111 int action_flags; 111 int action_flags;
112 struct list_head list; 112 struct list_head list;
113 int state; 113 int state;
114 bool failover_sent;
114 u16 sync_point; 115 u16 sync_point;
115 int link_cnt; 116 int link_cnt;
116 u16 working_links; 117 u16 working_links;
@@ -680,6 +681,7 @@ static void __tipc_node_link_up(struct tipc_node *n, int bearer_id,
680 *slot0 = bearer_id; 681 *slot0 = bearer_id;
681 *slot1 = bearer_id; 682 *slot1 = bearer_id;
682 tipc_node_fsm_evt(n, SELF_ESTABL_CONTACT_EVT); 683 tipc_node_fsm_evt(n, SELF_ESTABL_CONTACT_EVT);
684 n->failover_sent = false;
683 n->action_flags |= TIPC_NOTIFY_NODE_UP; 685 n->action_flags |= TIPC_NOTIFY_NODE_UP;
684 tipc_link_set_active(nl, true); 686 tipc_link_set_active(nl, true);
685 tipc_bcast_add_peer(n->net, nl, xmitq); 687 tipc_bcast_add_peer(n->net, nl, xmitq);
@@ -911,6 +913,7 @@ void tipc_node_check_dest(struct net *net, u32 addr,
911 bool reset = true; 913 bool reset = true;
912 char *if_name; 914 char *if_name;
913 unsigned long intv; 915 unsigned long intv;
916 u16 session;
914 917
915 *dupl_addr = false; 918 *dupl_addr = false;
916 *respond = false; 919 *respond = false;
@@ -997,9 +1000,10 @@ void tipc_node_check_dest(struct net *net, u32 addr,
997 goto exit; 1000 goto exit;
998 1001
999 if_name = strchr(b->name, ':') + 1; 1002 if_name = strchr(b->name, ':') + 1;
1003 get_random_bytes(&session, sizeof(u16));
1000 if (!tipc_link_create(net, if_name, b->identity, b->tolerance, 1004 if (!tipc_link_create(net, if_name, b->identity, b->tolerance,
1001 b->net_plane, b->mtu, b->priority, 1005 b->net_plane, b->mtu, b->priority,
1002 b->window, mod(tipc_net(net)->random), 1006 b->window, session,
1003 tipc_own_addr(net), addr, peer_id, 1007 tipc_own_addr(net), addr, peer_id,
1004 n->capabilities, 1008 n->capabilities,
1005 tipc_bc_sndlink(n->net), n->bc_entry.link, 1009 tipc_bc_sndlink(n->net), n->bc_entry.link,
@@ -1615,6 +1619,14 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
1615 tipc_skb_queue_splice_tail_init(tipc_link_inputq(pl), 1619 tipc_skb_queue_splice_tail_init(tipc_link_inputq(pl),
1616 tipc_link_inputq(l)); 1620 tipc_link_inputq(l));
1617 } 1621 }
1622 /* If parallel link was already down, and this happened before
1623 * the tunnel link came up, FAILOVER was never sent. Ensure that
1624 * FAILOVER is sent to get peer out of NODE_FAILINGOVER state.
1625 */
1626 if (n->state != NODE_FAILINGOVER && !n->failover_sent) {
1627 tipc_link_create_dummy_tnl_msg(l, xmitq);
1628 n->failover_sent = true;
1629 }
1618 /* If pkts arrive out of order, use lowest calculated syncpt */ 1630 /* If pkts arrive out of order, use lowest calculated syncpt */
1619 if (less(syncpt, n->sync_point)) 1631 if (less(syncpt, n->sync_point))
1620 n->sync_point = syncpt; 1632 n->sync_point = syncpt;