]> git.hungrycats.org Git - linux/commitdiff
net: sched: integer overflow fix
authorStefan Hasko <hasko.stevo@gmail.com>
Fri, 21 Dec 2012 15:04:59 +0000 (15:04 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Jun 2013 09:43:28 +0000 (11:43 +0200)
[ Upstream commit d2fe85da52e89b8012ffad010ef352a964725d5f ]

Fixed integer overflow in function htb_dequeue

Signed-off-by: Stefan Hasko <hasko.stevo@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/sched/sch_htb.c

index 85acab9dc6fd8968ebaeea28f931f9c4b5d19763..2f074d66377fab2e1850581595d1c338ff335409 100644 (file)
@@ -865,7 +865,7 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
        q->now = psched_get_time();
        start_at = jiffies;
 
-       next_event = q->now + 5 * PSCHED_TICKS_PER_SEC;
+       next_event = q->now + 5LLU * PSCHED_TICKS_PER_SEC;
 
        for (level = 0; level < TC_HTB_MAXDEPTH; level++) {
                /* common case optimization - skip event handler quickly */