]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
pkt_sched: fix virtual-start-time update in QFQ
authorPaolo Valente <paolo.valente@unimore.it>
Sat, 15 Sep 2012 00:41:35 +0000 (00:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:28:06 +0000 (05:28 +0900)
commit3f99feef88eb867056bd4459e4cf68da33af8861
tree5fae9878c0d2732aad01e3bfd660721f3e7163d3
parent829f2161f7057a511df7a41e52c5a43cbf5a49d7
pkt_sched: fix virtual-start-time update in QFQ

[ Upstream commit 71261956973ba9e0637848a5adb4a5819b4bae83 ]

If the old timestamps of a class, say cl, are stale when the class
becomes active, then QFQ may assign to cl a much higher start time
than the maximum value allowed. This may happen when QFQ assigns to
the start time of cl the finish time of a group whose classes are
characterized by a higher value of the ratio
max_class_pkt/weight_of_the_class with respect to that of
cl. Inserting a class with a too high start time into the bucket list
corrupts the data structure and may eventually lead to crashes.
This patch limits the maximum start time assigned to a class.

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_qfq.c