Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4003b658 authored by John Fastabend's avatar John Fastabend Committed by David S. Miller
Browse files

dcb: Add missing error check in dcb_ieee_set()



Missing error checking before nla_parse_nested().

Reported-by: default avatarMark Rustad <mark.d.rustad@intel.com>
Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab6baf98
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1368,6 +1368,9 @@ static int dcbnl_ieee_set(struct net_device *netdev, struct nlattr **tb,
	if (!ops)
		return err;

	if (!tb[DCB_ATTR_IEEE])
		return -EINVAL;

	err = nla_parse_nested(ieee, DCB_ATTR_IEEE_MAX,
			       tb[DCB_ATTR_IEEE], dcbnl_ieee_policy);
	if (err)