aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-05-11 17:14:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-05-11 17:14:46 -0400
commit4bc871984f7cb5b2dec3ae64b570cb02f9ce2227 (patch)
tree12b040a416857423929e7739b5babd81e861e90f /net/tipc/node.c
parenta1f45efbb90cce436bde335f8ce78538634951c8 (diff)
parenta52956dfc503f8cc5cfe6454959b7049fddb4413 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Verify lengths of keys provided by the user is AF_KEY, from Kevin Easton. 2) Add device ID for BCM89610 PHY. Thanks to Bhadram Varka. 3) Add Spectre guards to some ATM code, courtesy of Gustavo A. R. Silva. 4) Fix infinite loop in NSH protocol code. To Eric Dumazet we are most grateful for this fix. 5) Line up /proc/net/netlink headers properly. This fix from YU Bo, we do appreciate. 6) Use after free in TLS code. Once again we are blessed by the honorable Eric Dumazet with this fix. 7) Fix regression in TLS code causing stalls on partial TLS records. This fix is bestowed upon us by Andrew Tomt. 8) Deal with too small MTUs properly in LLC code, another great gift from Eric Dumazet. 9) Handle cached route flushing properly wrt. MTU locking in ipv4, to Hangbin Liu we give thanks for this. 10) Fix regression in SO_BINDTODEVIC handling wrt. UDP socket demux. Paolo Abeni, he gave us this. 11) Range check coalescing parameters in mlx4 driver, thank you Moshe Shemesh. 12) Some ipv6 ICMP error handling fixes in rxrpc, from our good brother David Howells. 13) Fix kexec on mlx5 by freeing IRQs in shutdown path. Daniel Juergens, you're the best! 14) Don't send bonding RLB updates to invalid MAC addresses. Debabrata Benerjee saved us! 15) Uh oh, we were leaking in udp_sendmsg and ping_v4_sendmsg. The ship is now water tight, thanks to Andrey Ignatov. 16) IPSEC memory leak in ixgbe from Colin Ian King, man we've got holes everywhere! 17) Fix error path in tcf_proto_create, Jiri Pirko what would we do without you! * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (92 commits) net sched actions: fix refcnt leak in skbmod net: sched: fix error path in tcf_proto_create() when modules are not configured net sched actions: fix invalid pointer dereferencing if skbedit flags missing ixgbe: fix memory leak on ipsec allocation ixgbevf: fix ixgbevf_xmit_frame()'s return type ixgbe: return error on unsupported SFP module when resetting ice: Set rq_last_status when cleaning rq ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg mlxsw: core: Fix an error handling path in 'mlxsw_core_bus_device_register()' bonding: send learning packets for vlans on slave bonding: do not allow rlb updates to invalid mac net/mlx5e: Err if asked to offload TC match on frag being first net/mlx5: E-Switch, Include VF RDMA stats in vport statistics net/mlx5: Free IRQs in shutdown path rxrpc: Trace UDP transmission failure rxrpc: Add a tracepoint to log ICMP/ICMP6 and error messages rxrpc: Fix the min security level for kernel calls rxrpc: Fix error reception on AF_INET6 sockets rxrpc: Fix missing start of call timeout qed: fix spelling mistake: "taskelt" -> "tasklet" ...
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index baaf93f12cbd..f29549de9245 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1950,6 +1950,7 @@ out:
1950int tipc_nl_node_get_link(struct sk_buff *skb, struct genl_info *info) 1950int tipc_nl_node_get_link(struct sk_buff *skb, struct genl_info *info)
1951{ 1951{
1952 struct net *net = genl_info_net(info); 1952 struct net *net = genl_info_net(info);
1953 struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1];
1953 struct tipc_nl_msg msg; 1954 struct tipc_nl_msg msg;
1954 char *name; 1955 char *name;
1955 int err; 1956 int err;
@@ -1957,9 +1958,19 @@ int tipc_nl_node_get_link(struct sk_buff *skb, struct genl_info *info)
1957 msg.portid = info->snd_portid; 1958 msg.portid = info->snd_portid;
1958 msg.seq = info->snd_seq; 1959 msg.seq = info->snd_seq;
1959 1960
1960 if (!info->attrs[TIPC_NLA_LINK_NAME]) 1961 if (!info->attrs[TIPC_NLA_LINK])
1961 return -EINVAL; 1962 return -EINVAL;
1962 name = nla_data(info->attrs[TIPC_NLA_LINK_NAME]); 1963
1964 err = nla_parse_nested(attrs, TIPC_NLA_LINK_MAX,
1965 info->attrs[TIPC_NLA_LINK],
1966 tipc_nl_link_policy, info->extack);
1967 if (err)
1968 return err;
1969
1970 if (!attrs[TIPC_NLA_LINK_NAME])
1971 return -EINVAL;
1972
1973 name = nla_data(attrs[TIPC_NLA_LINK_NAME]);
1963 1974
1964 msg.skb = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); 1975 msg.skb = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
1965 if (!msg.skb) 1976 if (!msg.skb)