summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-11-20 04:07:14 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-20 04:07:14 -0800
commit3aa4614da741f10b09559a5675c79e2eff5cccd8 (patch)
tree0181c697123716bf574e7819854d373dc6ee18b8 /net/sched/sch_api.c
parentf7f65d1e8bfaa92c1a419c2a52faeca835659295 (diff)
downloadblackbird-op-linux-3aa4614da741f10b09559a5675c79e2eff5cccd8.tar.gz
blackbird-op-linux-3aa4614da741f10b09559a5675c79e2eff5cccd8.zip
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
nla_nest_start() might return NULL, causing a NULL pointer dereference. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r--net/sched/sch_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index b16ad2972c6b..6ab4a2f92ca0 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -417,6 +417,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab)
struct nlattr *nest;
nest = nla_nest_start(skb, TCA_STAB);
+ if (nest == NULL)
+ goto nla_put_failure;
NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts);
nla_nest_end(skb, nest);
OpenPOWER on IntegriCloud