diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-10 20:42:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-10 20:42:53 -0500 |
commit | 506c10f26c481b7f8ef27c1c79290f68989b2e9e (patch) | |
tree | 03de82e812f00957aa6276dac2fe51c3358e88d7 /kernel/sys.c | |
parent | e1df957670aef74ffd9a4ad93e6d2c90bf6b4845 (diff) | |
parent | c59765042f53a79a7a65585042ff463b69cb248c (diff) |
Merge commit 'v2.6.29-rc1' into perfcounters/core
Conflicts:
include/linux/kernel_stat.h
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 1544c305751e..c2a951ae4223 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/task_io_accounting_ops.h> | 34 | #include <linux/task_io_accounting_ops.h> |
35 | #include <linux/seccomp.h> | 35 | #include <linux/seccomp.h> |
36 | #include <linux/cpu.h> | 36 | #include <linux/cpu.h> |
37 | #include <linux/ptrace.h> | ||
37 | 38 | ||
38 | #include <linux/compat.h> | 39 | #include <linux/compat.h> |
39 | #include <linux/syscalls.h> | 40 | #include <linux/syscalls.h> |
@@ -908,8 +909,8 @@ void do_sys_times(struct tms *tms) | |||
908 | struct task_cputime cputime; | 909 | struct task_cputime cputime; |
909 | cputime_t cutime, cstime; | 910 | cputime_t cutime, cstime; |
910 | 911 | ||
911 | spin_lock_irq(¤t->sighand->siglock); | ||
912 | thread_group_cputime(current, &cputime); | 912 | thread_group_cputime(current, &cputime); |
913 | spin_lock_irq(¤t->sighand->siglock); | ||
913 | cutime = current->signal->cutime; | 914 | cutime = current->signal->cutime; |
914 | cstime = current->signal->cstime; | 915 | cstime = current->signal->cstime; |
915 | spin_unlock_irq(¤t->sighand->siglock); | 916 | spin_unlock_irq(¤t->sighand->siglock); |
@@ -928,6 +929,7 @@ asmlinkage long sys_times(struct tms __user * tbuf) | |||
928 | if (copy_to_user(tbuf, &tmp, sizeof(struct tms))) | 929 | if (copy_to_user(tbuf, &tmp, sizeof(struct tms))) |
929 | return -EFAULT; | 930 | return -EFAULT; |
930 | } | 931 | } |
932 | force_successful_syscall_return(); | ||
931 | return (long) jiffies_64_to_clock_t(get_jiffies_64()); | 933 | return (long) jiffies_64_to_clock_t(get_jiffies_64()); |
932 | } | 934 | } |
933 | 935 | ||
@@ -1628,6 +1630,8 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) | |||
1628 | utime = stime = cputime_zero; | 1630 | utime = stime = cputime_zero; |
1629 | 1631 | ||
1630 | if (who == RUSAGE_THREAD) { | 1632 | if (who == RUSAGE_THREAD) { |
1633 | utime = task_utime(current); | ||
1634 | stime = task_stime(current); | ||
1631 | accumulate_thread_rusage(p, r); | 1635 | accumulate_thread_rusage(p, r); |
1632 | goto out; | 1636 | goto out; |
1633 | } | 1637 | } |