projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89c8b3a
)
[PKT_SCHED]: Fix range in psched_tod_diff() to 0..bound
author
Nicolas Dichtel
<nicolas.dichtel@6wind.com>
Thu, 28 Apr 2005 19:14:37 +0000
(12:14 -0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 28 Apr 2005 19:14:37 +0000
(12:14 -0700)
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_sched.h
patch
|
blob
|
blame
|
history
diff --git
a/include/net/pkt_sched.h
b/include/net/pkt_sched.h
index 87496e3aa3302a4e8dc42f5c4f53a22f550d5008..7352e455053cc857e70f0cb1e008eb7adabbe011 100644
(file)
--- a/
include/net/pkt_sched.h
+++ b/
include/net/pkt_sched.h
@@
-140,7
+140,7
@@
psched_tod_diff(int delta_sec, int bound)
if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1)
return bound;
delta = delta_sec * 1000000;
- if (delta > bound)
+ if (delta > bound
|| delta < 0
)
delta = bound;
return delta;
}
@@
-156,7
+156,8
@@
psched_tod_diff(int delta_sec, int bound)
__delta += 1000000; \
case 1: \
__delta += 1000000; \
- case 0: ; \
+ case 0: \
+ __delta = abs(__delta); \
} \
__delta; \
})