diff options
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index a6b30df6ec02..43a515dc97b0 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -1145,11 +1145,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b_ptr) | |||
1145 | } | 1145 | } |
1146 | /* Synchronize with parallel link if applicable */ | 1146 | /* Synchronize with parallel link if applicable */ |
1147 | if (unlikely((l_ptr->flags & LINK_SYNCHING) && !msg_dup(msg))) { | 1147 | if (unlikely((l_ptr->flags & LINK_SYNCHING) && !msg_dup(msg))) { |
1148 | link_handle_out_of_seq_msg(l_ptr, skb); | 1148 | if (!link_synch(l_ptr)) |
1149 | if (link_synch(l_ptr)) | 1149 | goto unlock; |
1150 | link_retrieve_defq(l_ptr, &head); | ||
1151 | skb = NULL; | ||
1152 | goto unlock; | ||
1153 | } | 1150 | } |
1154 | l_ptr->next_in_no++; | 1151 | l_ptr->next_in_no++; |
1155 | if (unlikely(!skb_queue_empty(&l_ptr->deferdq))) | 1152 | if (unlikely(!skb_queue_empty(&l_ptr->deferdq))) |
@@ -2013,7 +2010,7 @@ msg_full: | |||
2013 | 2010 | ||
2014 | /* Caller should hold appropriate locks to protect the link */ | 2011 | /* Caller should hold appropriate locks to protect the link */ |
2015 | static int __tipc_nl_add_link(struct net *net, struct tipc_nl_msg *msg, | 2012 | static int __tipc_nl_add_link(struct net *net, struct tipc_nl_msg *msg, |
2016 | struct tipc_link *link) | 2013 | struct tipc_link *link, int nlflags) |
2017 | { | 2014 | { |
2018 | int err; | 2015 | int err; |
2019 | void *hdr; | 2016 | void *hdr; |
@@ -2022,7 +2019,7 @@ static int __tipc_nl_add_link(struct net *net, struct tipc_nl_msg *msg, | |||
2022 | struct tipc_net *tn = net_generic(net, tipc_net_id); | 2019 | struct tipc_net *tn = net_generic(net, tipc_net_id); |
2023 | 2020 | ||
2024 | hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, | 2021 | hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, |
2025 | NLM_F_MULTI, TIPC_NL_LINK_GET); | 2022 | nlflags, TIPC_NL_LINK_GET); |
2026 | if (!hdr) | 2023 | if (!hdr) |
2027 | return -EMSGSIZE; | 2024 | return -EMSGSIZE; |
2028 | 2025 | ||
@@ -2095,7 +2092,7 @@ static int __tipc_nl_add_node_links(struct net *net, struct tipc_nl_msg *msg, | |||
2095 | if (!node->links[i]) | 2092 | if (!node->links[i]) |
2096 | continue; | 2093 | continue; |
2097 | 2094 | ||
2098 | err = __tipc_nl_add_link(net, msg, node->links[i]); | 2095 | err = __tipc_nl_add_link(net, msg, node->links[i], NLM_F_MULTI); |
2099 | if (err) | 2096 | if (err) |
2100 | return err; | 2097 | return err; |
2101 | } | 2098 | } |
@@ -2143,7 +2140,6 @@ int tipc_nl_link_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
2143 | err = __tipc_nl_add_node_links(net, &msg, node, | 2140 | err = __tipc_nl_add_node_links(net, &msg, node, |
2144 | &prev_link); | 2141 | &prev_link); |
2145 | tipc_node_unlock(node); | 2142 | tipc_node_unlock(node); |
2146 | tipc_node_put(node); | ||
2147 | if (err) | 2143 | if (err) |
2148 | goto out; | 2144 | goto out; |
2149 | 2145 | ||
@@ -2210,7 +2206,7 @@ int tipc_nl_link_get(struct sk_buff *skb, struct genl_info *info) | |||
2210 | goto err_out; | 2206 | goto err_out; |
2211 | } | 2207 | } |
2212 | 2208 | ||
2213 | err = __tipc_nl_add_link(net, &msg, link); | 2209 | err = __tipc_nl_add_link(net, &msg, link, 0); |
2214 | if (err) | 2210 | if (err) |
2215 | goto err_out; | 2211 | goto err_out; |
2216 | 2212 | ||