[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090227101634.GD4156@ff.dom.local>
Date: Fri, 27 Feb 2009 10:16:34 +0000
From: Jarek Poplawski <jarkao2@...il.com>
To: David Miller <davem@...emloft.net>
Cc: Denys Fedoryschenko <denys@...p.net.lb>, netdev@...r.kernel.org,
Patrick McHardy <kaber@...sh.net>
Subject: [PATCH] Re: probably bug in drr scheduler, 2.6.29-rc5
On 26-02-2009 16:45, Denys Fedoryschenko wrote:
> Hi, triggered a bug in DRR seems
...
> [65298.391392] BUG: unable to handle kernel NULL pointer dereference at (null)
> [65298.391397] IP: [<ffffffffa0021700>] drr_change_class+0x39/0x2de [sch_drr]
...
Thanks for the report,
Jarek P.
----------->
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@...p.net.lb>
Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
---
net/sched/sch_drr.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists