diff options
author | Patrick McHardy <kaber@trash.net> | 2008-11-20 07:07:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 07:07:14 -0500 |
commit | 3aa4614da741f10b09559a5675c79e2eff5cccd8 (patch) | |
tree | 0181c697123716bf574e7819854d373dc6ee18b8 /net/sched/sch_api.c | |
parent | f7f65d1e8bfaa92c1a419c2a52faeca835659295 (diff) |
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.c | 2 |
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) | |||
417 | struct nlattr *nest; | 417 | struct nlattr *nest; |
418 | 418 | ||
419 | nest = nla_nest_start(skb, TCA_STAB); | 419 | nest = nla_nest_start(skb, TCA_STAB); |
420 | if (nest == NULL) | ||
421 | goto nla_put_failure; | ||
420 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); | 422 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); |
421 | nla_nest_end(skb, nest); | 423 | nla_nest_end(skb, nest); |
422 | 424 | ||