Commit 568c3285 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Linus Torvalds

[PATCH] limit max jiffy of msecs_to_jiffies

parent 43403bb3
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment