summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-05-11 21:22:03 +0200
committerDavid S. Miller <davem@davemloft.net>2006-05-11 21:22:03 +0200
commit210525d65d33d17eb6bea6c965ce442d60d9aa8d (patch)
tree951e5e4ceef5d7b4bfef693a3c291f756a74bf82 /net
parent[IPV6]: skb leakage in inet6_csk_xmit (diff)
downloadlinux-210525d65d33d17eb6bea6c965ce442d60d9aa8d.tar.xz
linux-210525d65d33d17eb6bea6c965ce442d60d9aa8d.zip
[NET_SCHED]: HFSC: fix thinko in hfsc_adjust_levels()
When deleting the last child the level of a class should drop to zero. Noticed by Andreas Mueller <andreas@stapelspeicher.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_hfsc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 91132f6871d7..f1c7bd29f2cd 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -974,10 +974,10 @@ hfsc_adjust_levels(struct hfsc_class *cl)
do {
level = 0;
list_for_each_entry(p, &cl->children, siblings) {
- if (p->level > level)
- level = p->level;
+ if (p->level >= level)
+ level = p->level + 1;
}
- cl->level = level + 1;
+ cl->level = level;
} while ((cl = cl->cl_parent) != NULL);
}