diff options
author | David S. Miller | 2017-05-27 02:46:35 +0200 |
---|---|---|
committer | David S. Miller | 2017-05-27 02:46:35 +0200 |
commit | 34aa83c2fc23e055968387c8b78ac8bafd735aff (patch) | |
tree | a53a341d74613e512bf467ea12615f509cb53536 /net/core/rtnetlink.c | |
parent | Merge branch 'ibmvnic-Driver-updates' (diff) | |
parent | Merge tag 'led_fixes_for_4-12-rc3' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
download | kernel-qcow2-linux-34aa83c2fc23e055968387c8b78ac8bafd735aff.tar.gz kernel-qcow2-linux-34aa83c2fc23e055968387c8b78ac8bafd735aff.tar.xz kernel-qcow2-linux-34aa83c2fc23e055968387c8b78ac8bafd735aff.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes in drivers/net/phy/marvell.c, bug fix in 'net'
restricting a HW workaround alongside cleanups in 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index dab2834f58f8..64953af4a3b1 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -3231,8 +3231,11 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb) int err = 0; int fidx = 0; - if (nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, - IFLA_MAX, ifla_policy, NULL) == 0) { + err = nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, + IFLA_MAX, ifla_policy, NULL); + if (err < 0) { + return -EINVAL; + } else if (err == 0) { if (tb[IFLA_MASTER]) br_idx = nla_get_u32(tb[IFLA_MASTER]); } |