aboutsummaryrefslogtreecommitdiffstats
path: root/net/dcb
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2011-06-21 07:35:04 +0000
committerDavid S. Miller <davem@davemloft.net>2011-06-21 16:06:12 -0700
commit4003b65871c101eb5ce8f37a325feac54aa5c681 (patch)
tree67f7f335bbc5dc1043f69bde2ba7cd54ee468fe7 /net/dcb
parentab6baf980b095c70a56c5eb2f58166aef8a0edc8 (diff)
downloadkernel_goldelico_gta04-4003b65871c101eb5ce8f37a325feac54aa5c681.zip
kernel_goldelico_gta04-4003b65871c101eb5ce8f37a325feac54aa5c681.tar.gz
kernel_goldelico_gta04-4003b65871c101eb5ce8f37a325feac54aa5c681.tar.bz2
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>
Diffstat (limited to 'net/dcb')
-rw-r--r--net/dcb/dcbnl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index f54c784..e954d4c 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -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)