Patchwork [3.5.y.z,extended,stable] Patch "net: sched: integer overflow fix" has been added to staging queue

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Jan. 14, 2013, 8:58 p.m.
Message ID <1358197089-17766-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/211921/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Jan. 14, 2013, 8:58 p.m.
This is a note to let you know that I have just added a patch titled

    net: sched: integer overflow fix

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Herton

------

From 3ba4849cc9715fcbb1464b8c2349ce2010acb3e5 Mon Sep 17 00:00:00 2001
From: Stefan Hasko <hasko.stevo@gmail.com>
Date: Fri, 21 Dec 2012 15:04:59 +0000
Subject: [PATCH] net: sched: integer overflow fix

commit d2fe85da52e89b8012ffad010ef352a964725d5f upstream.

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: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 net/sched/sch_htb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.7.9.5

Patch

diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 9d75b77..e9ea2f3 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -874,7 +874,7 @@  ok:
 	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 */