diff options
| author | David S. Miller <davem@davemloft.net> | 2019-04-05 17:14:19 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-04-05 17:14:19 -0400 |
| commit | f83f7151950dd9e0f6b4a1a405bf5e55c5294e4d (patch) | |
| tree | f8d9d8ee821fcc9f0a8e1a8679bc622219c70e3b /net/tipc | |
| parent | 8f4043f1253292495dbf9c8be0c1b07b4b9902b7 (diff) | |
| parent | 7f46774c6480174eb869a3c15167eafac467a6af (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor comment merge conflict in mlx5.
Staging driver has a fixup due to the skb->xmit_more changes
in 'net-next', but was removed in 'net'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/netlink_compat.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 4ad3586da8f0..340a6e7c43a7 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c | |||
| @@ -267,8 +267,14 @@ static int tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd, | |||
| 267 | if (msg->rep_type) | 267 | if (msg->rep_type) |
| 268 | tipc_tlv_init(msg->rep, msg->rep_type); | 268 | tipc_tlv_init(msg->rep, msg->rep_type); |
| 269 | 269 | ||
| 270 | if (cmd->header) | 270 | if (cmd->header) { |
| 271 | (*cmd->header)(msg); | 271 | err = (*cmd->header)(msg); |
| 272 | if (err) { | ||
| 273 | kfree_skb(msg->rep); | ||
| 274 | msg->rep = NULL; | ||
| 275 | return err; | ||
| 276 | } | ||
| 277 | } | ||
| 272 | 278 | ||
| 273 | arg = nlmsg_new(0, GFP_KERNEL); | 279 | arg = nlmsg_new(0, GFP_KERNEL); |
| 274 | if (!arg) { | 280 | if (!arg) { |
| @@ -397,7 +403,12 @@ static int tipc_nl_compat_bearer_enable(struct tipc_nl_compat_cmd_doit *cmd, | |||
| 397 | if (!bearer) | 403 | if (!bearer) |
| 398 | return -EMSGSIZE; | 404 | return -EMSGSIZE; |
| 399 | 405 | ||
| 400 | len = min_t(int, TLV_GET_DATA_LEN(msg->req), TIPC_MAX_BEARER_NAME); | 406 | len = TLV_GET_DATA_LEN(msg->req); |
| 407 | len -= offsetof(struct tipc_bearer_config, name); | ||
| 408 | if (len <= 0) | ||
| 409 | return -EINVAL; | ||
| 410 | |||
| 411 | len = min_t(int, len, TIPC_MAX_BEARER_NAME); | ||
| 401 | if (!string_is_valid(b->name, len)) | 412 | if (!string_is_valid(b->name, len)) |
| 402 | return -EINVAL; | 413 | return -EINVAL; |
| 403 | 414 | ||
| @@ -766,7 +777,12 @@ static int tipc_nl_compat_link_set(struct tipc_nl_compat_cmd_doit *cmd, | |||
| 766 | 777 | ||
| 767 | lc = (struct tipc_link_config *)TLV_DATA(msg->req); | 778 | lc = (struct tipc_link_config *)TLV_DATA(msg->req); |
| 768 | 779 | ||
| 769 | len = min_t(int, TLV_GET_DATA_LEN(msg->req), TIPC_MAX_LINK_NAME); | 780 | len = TLV_GET_DATA_LEN(msg->req); |
| 781 | len -= offsetof(struct tipc_link_config, name); | ||
| 782 | if (len <= 0) | ||
| 783 | return -EINVAL; | ||
| 784 | |||
| 785 | len = min_t(int, len, TIPC_MAX_LINK_NAME); | ||
| 770 | if (!string_is_valid(lc->name, len)) | 786 | if (!string_is_valid(lc->name, len)) |
| 771 | return -EINVAL; | 787 | return -EINVAL; |
| 772 | 788 | ||
