projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab6baf9
)
dcb: Add missing error check in dcb_ieee_set()
author
John Fastabend
<john.r.fastabend@intel.com>
Tue, 21 Jun 2011 07:35:04 +0000
(07:35 +0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 21 Jun 2011 23:06:12 +0000
(16:06 -0700)
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>
net/dcb/dcbnl.c
patch
|
blob
|
history
diff --git
a/net/dcb/dcbnl.c
b/net/dcb/dcbnl.c
index
f54c784
..
e954d4c
100644
(file)
--- 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)