diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-02-04 09:51:49 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-02-04 09:51:49 -0500 |
| commit | 2fb20e2e35cd1455d022ab7a553d7f1663ffbdeb (patch) | |
| tree | 4b3bb0f76c15264fe7d4cced91127f3d96ff31f5 /kernel/compat.c | |
| parent | 9cb543124a2d31af42ce61a4c30765ecc8e5f1fa (diff) | |
| parent | 5b91ab0abc957145c3ff6be03eb9a3901797019f (diff) | |
Merge branch 'for-rmk/broadcast' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable
Diffstat (limited to 'kernel/compat.c')
| -rw-r--r-- | kernel/compat.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index f6150e92dfc9..36700e9e2be9 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
| @@ -535,9 +535,11 @@ asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru) | |||
| 535 | return 0; | 535 | return 0; |
| 536 | } | 536 | } |
| 537 | 537 | ||
| 538 | asmlinkage long | 538 | COMPAT_SYSCALL_DEFINE4(wait4, |
| 539 | compat_sys_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, int options, | 539 | compat_pid_t, pid, |
| 540 | struct compat_rusage __user *ru) | 540 | compat_uint_t __user *, stat_addr, |
| 541 | int, options, | ||
| 542 | struct compat_rusage __user *, ru) | ||
| 541 | { | 543 | { |
| 542 | if (!ru) { | 544 | if (!ru) { |
| 543 | return sys_wait4(pid, stat_addr, options, NULL); | 545 | return sys_wait4(pid, stat_addr, options, NULL); |
| @@ -564,9 +566,10 @@ compat_sys_wait4(compat_pid_t pid, compat_uint_t __user *stat_addr, int options, | |||
| 564 | } | 566 | } |
| 565 | } | 567 | } |
| 566 | 568 | ||
| 567 | asmlinkage long compat_sys_waitid(int which, compat_pid_t pid, | 569 | COMPAT_SYSCALL_DEFINE5(waitid, |
| 568 | struct compat_siginfo __user *uinfo, int options, | 570 | int, which, compat_pid_t, pid, |
| 569 | struct compat_rusage __user *uru) | 571 | struct compat_siginfo __user *, uinfo, int, options, |
| 572 | struct compat_rusage __user *, uru) | ||
| 570 | { | 573 | { |
| 571 | siginfo_t info; | 574 | siginfo_t info; |
| 572 | struct rusage ru; | 575 | struct rusage ru; |
| @@ -584,7 +587,11 @@ asmlinkage long compat_sys_waitid(int which, compat_pid_t pid, | |||
| 584 | return ret; | 587 | return ret; |
| 585 | 588 | ||
| 586 | if (uru) { | 589 | if (uru) { |
| 587 | ret = put_compat_rusage(&ru, uru); | 590 | /* sys_waitid() overwrites everything in ru */ |
| 591 | if (COMPAT_USE_64BIT_TIME) | ||
| 592 | ret = copy_to_user(uru, &ru, sizeof(ru)); | ||
| 593 | else | ||
| 594 | ret = put_compat_rusage(&ru, uru); | ||
| 588 | if (ret) | 595 | if (ret) |
| 589 | return ret; | 596 | return ret; |
| 590 | } | 597 | } |
| @@ -994,7 +1001,7 @@ compat_sys_rt_sigtimedwait (compat_sigset_t __user *uthese, | |||
| 994 | sigset_from_compat(&s, &s32); | 1001 | sigset_from_compat(&s, &s32); |
| 995 | 1002 | ||
| 996 | if (uts) { | 1003 | if (uts) { |
| 997 | if (get_compat_timespec(&t, uts)) | 1004 | if (compat_get_timespec(&t, uts)) |
| 998 | return -EFAULT; | 1005 | return -EFAULT; |
| 999 | } | 1006 | } |
| 1000 | 1007 | ||
