Skip to contentSkip to conversation

sch_sfb: Fix missing NULL check

PATCH Applied Alan Cox 3 participants 4 messages Jul 12, 2012

Subsystems (3)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 sch_sfb: Fix missing NULL check

From: Alan Cox <[email protected]>

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44461

---

 net/sched/sch_sfb.c |    2 ++
 1 file changed, 2 insertions(+)
net/sched/sch_sfb.c +2 -0
index 74305c8..30ea467 100644
@@ -570,6 +570,8 @@ static int sfb_dump(struct Qdisc *sch, struct sk_buff *skb)
 
 	sch->qstats.backlog = q->qdisc->qstats.backlog;
 	opts = nla_nest_start(skb, TCA_OPTIONS);
+	if (opts == NULL)
+		goto nla_put_failure;
 	if (nla_put(skb, TCA_SFB_PARMS, sizeof(opt), &opt))
 		goto nla_put_failure;
 	return nla_nest_end(skb, opts);
maintainer Applied
#3 lore raw

From: Eric Dumazet <[email protected]>
Date: Thu, 12 Jul 2012 15:50:21 +0200

Quoted 10 lines · David Miller
Quoted 7 lines

From: Alan Cox <[email protected]>
Date: Thu, 12 Jul 2012 14:39:11 +0100

Quoted 1 line
                           ^^^^

I'm truly astonished that you type in signoffs by hand Alan.

Weel, I do the same ;)

You guys are weird :-)

Quoted 3 lines

Feel free to add my

Applied, with signoff typo fixed too :-)