From: Alan Cox Date: Thu, 12 Jul 2012 03:39:11 +0000 (+0000) Subject: sch_sfb: Fix missing NULL check X-Git-Tag: firefly_0821_release~7541^2~858 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9b9f676623b92483d890d1a3a52611c09fc190f3;p=firefly-linux-kernel-4.4.55.git sch_sfb: Fix missing NULL check [ Upstream commit 7ac2908e4b2edaec60e9090ddb4d9ceb76c05e7d ] Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44461 Signed-off-by: Alan Cox Acked-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sched/sch_sfb.c b/net/sched/sch_sfb.c index 47ee29fad350..e85b248773e7 100644 --- a/net/sched/sch_sfb.c +++ b/net/sched/sch_sfb.c @@ -556,6 +556,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; NLA_PUT(skb, TCA_SFB_PARMS, sizeof(opt), &opt); return nla_nest_end(skb, opts);