tc stack overflow

From: Thomas Heinz (
Date: Sat Jul 05 2003 - 17:21:40 EST


Have you already crashed your kernel today? No? Well, try this one:

# tc qdisc add dev eth0 root handle 1: prio \
   for i in `seq 500` ; do tc qdisc add dev eth0 \
       parent $i:1 handle `expr $i + 1`: prio ; done ; \

[replace eth0 by a device of your choice]

I think some of you are aware of the problem but strangely I didn't
find any mention on linux-kernel or linux-netdev or lartc.

The problem is that the depth of the classification tree is not limited
in any way and since for every qdisc the corresponding enqueue function
is called we have a stack overflow here.

IMO the problem could be fixed by adding a depth parameter to the
enqueue function. This way the function can decide whether it is save
to go deeper down the tree (maybe subject to a global policy).

So, what do you think about the issue? Do you care?



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:25 EST