diff options
| author | Stephen Hemminger <shemminger@osdl.org> | 2004-09-29 22:16:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-29 22:16:36 -0700 |
| commit | 568c32850bf11644b4b660eeba7ae09496bff24d (patch) | |
| tree | db4aba8acf1478e058e764a1892d92d26fb3c6be /include | |
| parent | 43403bb322aced46861641387394ade0f006ac9d (diff) | |
[PATCH] limit max jiffy of msecs_to_jiffies
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/time.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index 8bccdf73a97f..2111941c1af7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -208,6 +208,8 @@ static inline unsigned int jiffies_to_usecs(const unsigned long j) static inline unsigned long msecs_to_jiffies(const unsigned int m) { + if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) + return MAX_JIFFY_OFFSET; #if HZ <= 1000 && !(1000 % HZ) return (m + (1000 / HZ) - 1) / (1000 / HZ); #elif HZ > 1000 && !(HZ % 1000) |
