* Crash using Kernel 2.8.1 and HTB
@ 2004-08-19 11:56 Laurent CARON
2004-08-19 14:45 ` David S. Miller
2004-08-19 14:54 ` Jose Luis Domingo Lopez
0 siblings, 2 replies; 3+ messages in thread
From: Laurent CARON @ 2004-08-19 11:56 UTC (permalink / raw)
To: linux-kernel
Hello,
I'm experiencing a strange behavior with the HTB part of the 2.8.1 kernel.
My computer boots fine, but when I enable HTB (via Fiaif) the computer
hangs.
Did anyone get the same problem?
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Crash using Kernel 2.8.1 and HTB
2004-08-19 11:56 Crash using Kernel 2.8.1 and HTB Laurent CARON
@ 2004-08-19 14:45 ` David S. Miller
2004-08-19 14:54 ` Jose Luis Domingo Lopez
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2004-08-19 14:45 UTC (permalink / raw)
To: Laurent CARON; +Cc: linux-kernel
On Thu, 19 Aug 2004 13:56:32 +0200
Laurent CARON <lcaron@apartia.fr> wrote:
> I'm experiencing a strange behavior with the HTB part of the 2.8.1 kernel.
>
> My computer boots fine, but when I enable HTB (via Fiaif) the computer
> hangs.
>
> Did anyone get the same problem?
Yes, the fix has been posted a bunch of times to the lists.
Included below:
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/15 19:33:16-07:00 kaber@trash.net
# [PKT_SCHED]: cacheline-align qdisc data in qdisc_create()
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
# Signed-off-by: David S. Miller <davem@redhat.com>
#
# net/sched/sch_api.c
# 2004/08/15 19:32:59-07:00 kaber@trash.net +13 -8
# [PKT_SCHED]: cacheline-align qdisc data in qdisc_create()
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
# Signed-off-by: David S. Miller <davem@redhat.com>
#
diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c
--- a/net/sched/sch_api.c 2004-08-19 07:33:10 -07:00
+++ b/net/sched/sch_api.c 2004-08-19 07:33:10 -07:00
@@ -389,7 +389,8 @@
{
int err;
struct rtattr *kind = tca[TCA_KIND-1];
- struct Qdisc *sch = NULL;
+ void *p = NULL;
+ struct Qdisc *sch;
struct Qdisc_ops *ops;
int size;
@@ -407,12 +408,18 @@
if (ops == NULL)
goto err_out;
- size = sizeof(*sch) + ops->priv_size;
+ /* ensure that the Qdisc and the private data are 32-byte aligned */
+ size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST);
+ size += ops->priv_size + QDISC_ALIGN_CONST;
- sch = kmalloc(size, GFP_KERNEL);
+ p = kmalloc(size, GFP_KERNEL);
err = -ENOBUFS;
- if (!sch)
+ if (!p)
goto err_out;
+ memset(p, 0, size);
+ sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST)
+ & ~QDISC_ALIGN_CONST);
+ sch->padded = (char *)sch - (char *)p;
/* Grrr... Resolve race condition with module unload */
@@ -420,8 +427,6 @@
if (ops != qdisc_lookup_ops(kind))
goto err_out;
- memset(sch, 0, size);
-
INIT_LIST_HEAD(&sch->list);
skb_queue_head_init(&sch->q);
@@ -470,8 +475,8 @@
err_out:
*errp = err;
- if (sch)
- kfree(sch);
+ if (p)
+ kfree(p);
return NULL;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Crash using Kernel 2.8.1 and HTB
2004-08-19 11:56 Crash using Kernel 2.8.1 and HTB Laurent CARON
2004-08-19 14:45 ` David S. Miller
@ 2004-08-19 14:54 ` Jose Luis Domingo Lopez
1 sibling, 0 replies; 3+ messages in thread
From: Jose Luis Domingo Lopez @ 2004-08-19 14:54 UTC (permalink / raw)
To: linux-kernel
On Thursday, 19 August 2004, at 13:56:32 +0200,
Laurent CARON wrote:
> My computer boots fine, but when I enable HTB (via Fiaif) the computer
> hangs.
> Did anyone get the same problem?
>
It seems you have been bitten by a known bug, which Dave S. Miller
patched a couple of days ago. See the following thread:
http://marc.theaimsgroup.com/?l=linux-kernel&m=109263832828196&w=2
Greetings.
--
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Sid (Linux 2.6.8.1-vp)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-19 14:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-19 11:56 Crash using Kernel 2.8.1 and HTB Laurent CARON
2004-08-19 14:45 ` David S. Miller
2004-08-19 14:54 ` Jose Luis Domingo Lopez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox