diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-02-24 17:05:06 -0800 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2003-02-24 17:05:06 -0800 |
| commit | f004b8b3335ccb975a122a33990c783db98f8187 (patch) | |
| tree | 6c7b897cf79fd6ce70bbbf97d160f5f50aaa3e50 /kernel | |
| parent | 8542637fa47a145ac165d24b4cb2105df1aa2bd0 (diff) | |
[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.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index afa6d2fc1372..8e3fb524d641 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -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()); } /* |
