Commit f004b8b3 authored by Andrew Morton's avatar Andrew Morton Committed by Jeff Garzik

[PATCH] Fix user time accounting's handling of jiffies wrap

Patch from Hugh Dickins <hugh@veritas.com>

Userspace shows huge elapsed time across jiffies wrap: with USER_HZ less then
HZ, sys_times needs jiffies_64 to calculate its retval.
parent 8542637f
......@@ -870,7 +870,7 @@ asmlinkage long sys_times(struct tms * tbuf)
if (copy_to_user(tbuf, &tmp, sizeof(struct tms)))
return -EFAULT;
}
return jiffies_to_clock_t(jiffies);
return (long) jiffies_64_to_clock_t(get_jiffies_64());
}
/*
......
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