From: Patrick McHardy <kaber@trash.net>
To: Denys <denys@visp.net.lb>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
netdev@vger.kernel.org
Subject: Re: more... iproute2/htb/whatever critical bug ?
Date: Tue, 27 Mar 2007 17:10:36 +0200 [thread overview]
Message-ID: <460933EC.9060908@trash.net> (raw)
In-Reply-To: <20070326182654.M24011@visp.net.lb>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
Denys wrote:
> Mar 26 21:20:04 ROUTER-75 [ 551.481081] BUG: unable to handle kernel NULL
> pointer dereference
> Mar 26 21:20:04 ROUTER-75 at virtual address 00000074
> Mar 26 21:20:04 ROUTER-75 [ 551.481187] printing eip:
> Mar 26 21:20:04 ROUTER-75 [ 551.481236] f8a11df1
> Mar 26 21:20:04 ROUTER-75 [ 551.481289] *pde = 00000000
> Mar 26 21:20:04 ROUTER-75 [ 551.481340] Oops: 0000 [#1]
> Mar 26 21:20:04 ROUTER-75 [ 551.481384]
> Mar 26 21:20:04 ROUTER-75 SMP
> Mar 26 21:20:04 ROUTER-75
> Mar 26 21:20:04 ROUTER-75 [ 551.481549] Modules linked in:
> .... long module list
> ar 26 21:20:04 ROUTER-75 [ 551.485237] CPU: 0
> Mar 26 21:20:04 ROUTER-75 [ 551.485238] EIP: 0060:[<f8a11df1>] Not
> tainted VLI
> Mar 26 21:20:04 ROUTER-75 [ 551.485239] EFLAGS: 00010282 (2.6.20.3-build-
> 0001 #4)
> Mar 26 21:20:04 ROUTER-75 [ 551.485438] EIP is at htb_qlen_notify+0x9/0x79
> [sch_htb]
Oops, that seems to be my fault. Can you please try the attached patch?
To reproduce the problem you need to have packets queued while the
device is going down, so please make sure that is true by flooding
the device or something like that.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1334 bytes --]
[NET_SCHED]: sch_htb: fix oops in htb_qlen_notify
htb_delete calls qdisc_tree_decrease_qlen after removing the class from
the class hash. This makes the ->get operation in qdisc_tree_decrease_qlen
fail, so it passes a NULL pointer to htb_qlen_notify, causing an oops.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 866d03284bf4ae694c8c12c1742dde1c5c06eca7
tree e43ac244d44b2422f0acb92dc9a48a66f92c2792
parent 703071b5b93d88d5acb0edd5b9dd86c69ad970f2
author Patrick McHardy <kaber@trash.net> Tue, 27 Mar 2007 17:07:50 +0200
committer Patrick McHardy <kaber@trash.net> Tue, 27 Mar 2007 17:07:50 +0200
net/sched/sch_htb.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 97cbb9a..3c3294d 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1380,15 +1380,15 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
sch_tree_lock(sch);
- /* delete from hash and active; remainder in destroy_class */
- hlist_del_init(&cl->hlist);
-
if (!cl->level) {
qlen = cl->un.leaf.q->q.qlen;
qdisc_reset(cl->un.leaf.q);
qdisc_tree_decrease_qlen(cl->un.leaf.q, qlen);
}
+ /* delete from hash and active; remainder in destroy_class */
+ hlist_del_init(&cl->hlist);
+
if (cl->prio_activity)
htb_deactivate(q, cl);
next prev parent reply other threads:[~2007-03-27 15:11 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 18:00 iproute2-2.6.20-070313 bug ? Denys
2007-03-22 11:23 ` Patrick McHardy
2007-03-22 12:46 ` Denys
2007-03-22 13:09 ` Patrick McHardy
[not found] ` <20070322131245.M85528@visp.net.lb>
2007-03-22 13:23 ` Patrick McHardy
2007-03-22 13:35 ` Denys
[not found] ` <20070322132637.M88445@visp.net.lb>
2007-03-22 13:43 ` Patrick McHardy
2007-03-22 13:47 ` Denys
2007-03-22 13:26 ` Denys
2007-03-22 17:12 ` Stephen Hemminger
2007-03-22 17:14 ` Patrick McHardy
2007-03-26 18:49 ` more... iproute2/htb/whatever critical " Denys
2007-03-27 15:10 ` Patrick McHardy [this message]
2007-03-27 15:18 ` Denys
2007-03-27 16:00 ` Denys
2007-03-27 16:21 ` Patrick McHardy
2007-03-28 17:38 ` another " Denys
2007-03-28 23:55 ` Denys
2007-03-29 10:58 ` Patrick McHardy
2007-03-31 2:26 ` more iproute2 issues (not critical) Denys
2007-03-31 2:31 ` Denys
2007-03-31 14:16 ` Patrick McHardy
2007-04-04 0:03 ` one more... iproute commands lockup whole system Denys
2007-04-04 1:10 ` jamal
2007-04-04 1:39 ` Patrick McHardy
2007-04-04 2:09 ` jamal
2007-04-04 2:11 ` Denys
2007-04-04 10:55 ` jamal
2007-04-04 12:56 ` Denys
2007-04-04 14:10 ` jamal
2007-04-04 14:35 ` Denys
2007-04-04 14:13 ` HTB/act_mirred problem [was: one more... iproute commands lockup whole system] Patrick McHardy
2007-04-04 14:33 ` jamal
2007-04-04 14:50 ` Patrick McHardy
2007-04-05 1:33 ` jamal
2007-04-04 13:36 ` one more... iproute commands lockup whole system Patrick McHardy
2007-04-04 13:58 ` jamal
2007-04-04 14:07 ` Patrick McHardy
2007-04-04 14:30 ` jamal
2007-04-04 14:39 ` Patrick McHardy
2007-04-05 2:14 ` jamal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=460933EC.9060908@trash.net \
--to=kaber@trash.net \
--cc=denys@visp.net.lb \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).