From: Stefan Hasko <hasko.stevo@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Stefan Hasko <hasko.stevo@gmail.com>
Subject: [PATCH] net: sched: integer overflow fix
Date: Sat, 22 Dec 2012 02:04:59 +0100 [thread overview]
Message-ID: <1356138300-16076-1-git-send-email-hasko.stevo@gmail.com> (raw)
Sorry, I did not realize different sizes casting problem, now it's clear to me. Thanks for help.
Fixed integer overflow in function htb_dequeue
Signed-off-by: Stefan Hasko <hasko.stevo@gmail.com>
---
net/sched/sch_htb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index d2922c0..51561ea 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -919,7 +919,7 @@ ok:
q->now = ktime_to_ns(ktime_get());
start_at = jiffies;
- next_event = q->now + 5 * NSEC_PER_SEC;
+ next_event = q->now + 5LLU * NSEC_PER_SEC;
for (level = 0; level < TC_HTB_MAXDEPTH; level++) {
/* common case optimization - skip event handler quickly */
--
1.7.10.4
next reply other threads:[~2012-12-22 1:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-22 1:04 Stefan Hasko [this message]
2012-12-22 1:16 ` Eric Dumazet
2012-12-22 8:03 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2012-12-21 20:39 Stefan Hasko
2012-12-21 22:51 ` Eric Dumazet
2012-12-22 0:11 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1356138300-16076-1-git-send-email-hasko.stevo@gmail.com \
--to=hasko.stevo@gmail.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®