Message ID | 20090227101634.GD4156@ff.dom.local |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Jarek Poplawski <jarkao2@gmail.com> Date: Fri, 27 Feb 2009 10:16:34 +0000 > pkt_sched: sch_drr: Fix oops in drr_change_class. > > drr_change_class lacks a check for NULL of tca[TCA_OPTIONS], so oops > is possible. > > Reported-by: Denys Fedoryschenko <denys@visp.net.lb> > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Applied and queued up for -stable, thanks Jarek! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Feb 27, 2009 at 02:46:13AM -0800, David Miller wrote: > From: Jarek Poplawski <jarkao2@gmail.com> > Date: Fri, 27 Feb 2009 10:16:34 +0000 > > > pkt_sched: sch_drr: Fix oops in drr_change_class. > > > > drr_change_class lacks a check for NULL of tca[TCA_OPTIONS], so oops > > is possible. > > > > Reported-by: Denys Fedoryschenko <denys@visp.net.lb> > > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> > > Applied and queued up for -stable, thanks Jarek! Hmm... if 2.6.29-rcX means -stable... Thanks, Jarek P. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Jarek Poplawski <jarkao2@gmail.com> Date: Fri, 27 Feb 2009 11:01:37 +0000 > On Fri, Feb 27, 2009 at 02:46:13AM -0800, David Miller wrote: > > From: Jarek Poplawski <jarkao2@gmail.com> > > Date: Fri, 27 Feb 2009 10:16:34 +0000 > > > > > pkt_sched: sch_drr: Fix oops in drr_change_class. > > > > > > drr_change_class lacks a check for NULL of tca[TCA_OPTIONS], so oops > > > is possible. > > > > > > Reported-by: Denys Fedoryschenko <denys@visp.net.lb> > > > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> > > > > Applied and queued up for -stable, thanks Jarek! > > Hmm... if 2.6.29-rcX means -stable... This bug doesn't exist in earlier releases like 2.6.28 and 2.6.27? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Feb 27, 2009 at 03:16:20AM -0800, David Miller wrote:
...
> This bug doesn't exist in earlier releases like 2.6.28 and 2.6.27?
Yes, sch_drr is 2.6.29 born.
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Jarek Poplawski <jarkao2@gmail.com> Date: Fri, 27 Feb 2009 11:25:00 +0000 > On Fri, Feb 27, 2009 at 03:16:20AM -0800, David Miller wrote: > ... > > This bug doesn't exist in earlier releases like 2.6.28 and 2.6.27? > > Yes, sch_drr is 2.6.29 born. Perfect, nothing to queue up for -stable then :-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index f6b4fa9..e36e94a 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c @@ -66,11 +66,15 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, { struct drr_sched *q = qdisc_priv(sch); struct drr_class *cl = (struct drr_class *)*arg; + struct nlattr *opt = tca[TCA_OPTIONS]; struct nlattr *tb[TCA_DRR_MAX + 1]; u32 quantum; int err; - err = nla_parse_nested(tb, TCA_DRR_MAX, tca[TCA_OPTIONS], drr_policy); + if (!opt) + return -EINVAL; + + err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy); if (err < 0) return err;