summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2017-05-06 11:17:06 +0800
committerDavid S. Miller <davem@davemloft.net>2017-05-08 14:57:05 -0400
commitd62844a825e87da345e11639e98deb617ef11e08 (patch)
treec725eac0890d5ed6703cf3872d0ccb61f1e15d95 /drivers/net
parentac45bd93a5035c2f39c9862b8b6ed692db0fdc87 (diff)
downloadop-kernel-dev-d62844a825e87da345e11639e98deb617ef11e08.zip
op-kernel-dev-d62844a825e87da345e11639e98deb617ef11e08.tar.gz
bonding: check nla_put_be32 return value
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index c502c13..47a8103 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -549,7 +549,8 @@ static int bond_fill_info(struct sk_buff *skb,
targets_added = 0;
for (i = 0; i < BOND_MAX_ARP_TARGETS; i++) {
if (bond->params.arp_targets[i]) {
- nla_put_be32(skb, i, bond->params.arp_targets[i]);
+ if (nla_put_be32(skb, i, bond->params.arp_targets[i]))
+ goto nla_put_failure;
targets_added = 1;
}
}
OpenPOWER on IntegriCloud