dcb: Add missing error check in dcb_ieee_set()
Missing error checking before nla_parse_nested(). Reported-by: Mark Rustad <mark.d.rustad@intel.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ab6baf980b
commit
4003b65871
|
@ -1368,6 +1368,9 @@ static int dcbnl_ieee_set(struct net_device *netdev, struct nlattr **tb,
|
||||||
if (!ops)
|
if (!ops)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
if (!tb[DCB_ATTR_IEEE])
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
err = nla_parse_nested(ieee, DCB_ATTR_IEEE_MAX,
|
err = nla_parse_nested(ieee, DCB_ATTR_IEEE_MAX,
|
||||||
tb[DCB_ATTR_IEEE], dcbnl_ieee_policy);
|
tb[DCB_ATTR_IEEE], dcbnl_ieee_policy);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
Loading…
Reference in New Issue