bonding: check nla_put_be32 return value
Subsystems (3)
PATCH 1/1 bonding: check nla_put_be32 return value
Signed-off-by Hangbin Liu <[email protected]>
--- drivers/net/bonding/bond_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_netlink.c +2 -1
@@ -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 ; } }
Signature · 1 line
2.5.5
From: Hangbin Liu <[email protected]>
Date: Sat, 6 May 2017 11:17:06 +0800
Quoted 1 line
Signed-off-by Hangbin Liu <[email protected]>
Applied.