diff options
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/bearer.c | 17 | ||||
| -rw-r--r-- | net/tipc/link.c | 15 |
2 files changed, 15 insertions, 17 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 3613e72e858e..70e3dacbf84a 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
| @@ -591,14 +591,14 @@ void tipc_bearer_stop(struct net *net) | |||
| 591 | 591 | ||
| 592 | /* Caller should hold rtnl_lock to protect the bearer */ | 592 | /* Caller should hold rtnl_lock to protect the bearer */ |
| 593 | static int __tipc_nl_add_bearer(struct tipc_nl_msg *msg, | 593 | static int __tipc_nl_add_bearer(struct tipc_nl_msg *msg, |
| 594 | struct tipc_bearer *bearer) | 594 | struct tipc_bearer *bearer, int nlflags) |
| 595 | { | 595 | { |
| 596 | void *hdr; | 596 | void *hdr; |
| 597 | struct nlattr *attrs; | 597 | struct nlattr *attrs; |
| 598 | struct nlattr *prop; | 598 | struct nlattr *prop; |
| 599 | 599 | ||
| 600 | hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, | 600 | hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, |
| 601 | NLM_F_MULTI, TIPC_NL_BEARER_GET); | 601 | nlflags, TIPC_NL_BEARER_GET); |
| 602 | if (!hdr) | 602 | if (!hdr) |
| 603 | return -EMSGSIZE; | 603 | return -EMSGSIZE; |
| 604 | 604 | ||
| @@ -657,7 +657,7 @@ int tipc_nl_bearer_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 657 | if (!bearer) | 657 | if (!bearer) |
| 658 | continue; | 658 | continue; |
| 659 | 659 | ||
| 660 | err = __tipc_nl_add_bearer(&msg, bearer); | 660 | err = __tipc_nl_add_bearer(&msg, bearer, NLM_F_MULTI); |
| 661 | if (err) | 661 | if (err) |
| 662 | break; | 662 | break; |
| 663 | } | 663 | } |
| @@ -705,7 +705,7 @@ int tipc_nl_bearer_get(struct sk_buff *skb, struct genl_info *info) | |||
| 705 | goto err_out; | 705 | goto err_out; |
| 706 | } | 706 | } |
| 707 | 707 | ||
| 708 | err = __tipc_nl_add_bearer(&msg, bearer); | 708 | err = __tipc_nl_add_bearer(&msg, bearer, 0); |
| 709 | if (err) | 709 | if (err) |
| 710 | goto err_out; | 710 | goto err_out; |
| 711 | rtnl_unlock(); | 711 | rtnl_unlock(); |
| @@ -857,14 +857,14 @@ int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info) | |||
| 857 | } | 857 | } |
| 858 | 858 | ||
| 859 | static int __tipc_nl_add_media(struct tipc_nl_msg *msg, | 859 | static int __tipc_nl_add_media(struct tipc_nl_msg *msg, |
| 860 | struct tipc_media *media) | 860 | struct tipc_media *media, int nlflags) |
| 861 | { | 861 | { |
| 862 | void *hdr; | 862 | void *hdr; |
| 863 | struct nlattr *attrs; | 863 | struct nlattr *attrs; |
| 864 | struct nlattr *prop; | 864 | struct nlattr *prop; |
| 865 | 865 | ||
| 866 | hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, | 866 | hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, |
| 867 | NLM_F_MULTI, TIPC_NL_MEDIA_GET); | 867 | nlflags, TIPC_NL_MEDIA_GET); |
| 868 | if (!hdr) | 868 | if (!hdr) |
| 869 | return -EMSGSIZE; | 869 | return -EMSGSIZE; |
| 870 | 870 | ||
| @@ -916,7 +916,8 @@ int tipc_nl_media_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 916 | 916 | ||
| 917 | rtnl_lock(); | 917 | rtnl_lock(); |
| 918 | for (; media_info_array[i] != NULL; i++) { | 918 | for (; media_info_array[i] != NULL; i++) { |
| 919 | err = __tipc_nl_add_media(&msg, media_info_array[i]); | 919 | err = __tipc_nl_add_media(&msg, media_info_array[i], |
| 920 | NLM_F_MULTI); | ||
| 920 | if (err) | 921 | if (err) |
| 921 | break; | 922 | break; |
| 922 | } | 923 | } |
| @@ -963,7 +964,7 @@ int tipc_nl_media_get(struct sk_buff *skb, struct genl_info *info) | |||
| 963 | goto err_out; | 964 | goto err_out; |
| 964 | } | 965 | } |
| 965 | 966 | ||
| 966 | err = __tipc_nl_add_media(&msg, media); | 967 | err = __tipc_nl_add_media(&msg, media, 0); |
| 967 | if (err) | 968 | if (err) |
| 968 | goto err_out; | 969 | goto err_out; |
| 969 | rtnl_unlock(); | 970 | rtnl_unlock(); |
diff --git a/net/tipc/link.c b/net/tipc/link.c index 57be6e6aff99..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 | } |
| @@ -2209,7 +2206,7 @@ int tipc_nl_link_get(struct sk_buff *skb, struct genl_info *info) | |||
| 2209 | goto err_out; | 2206 | goto err_out; |
| 2210 | } | 2207 | } |
| 2211 | 2208 | ||
| 2212 | err = __tipc_nl_add_link(net, &msg, link); | 2209 | err = __tipc_nl_add_link(net, &msg, link, 0); |
| 2213 | if (err) | 2210 | if (err) |
| 2214 | goto err_out; | 2211 | goto err_out; |
| 2215 | 2212 | ||
