diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/compat.c | 23 | ||||
| -rw-r--r-- | kernel/fork.c | 6 | ||||
| -rw-r--r-- | kernel/signal.c | 5 |
3 files changed, 22 insertions, 12 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 | ||
diff --git a/kernel/fork.c b/kernel/fork.c index 65ca6d27f24e..c535f33bbb9c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -1668,8 +1668,10 @@ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp, | |||
| 1668 | int, tls_val) | 1668 | int, tls_val) |
| 1669 | #endif | 1669 | #endif |
| 1670 | { | 1670 | { |
| 1671 | return do_fork(clone_flags, newsp, 0, | 1671 | long ret = do_fork(clone_flags, newsp, 0, parent_tidptr, child_tidptr); |
| 1672 | parent_tidptr, child_tidptr); | 1672 | asmlinkage_protect(5, ret, clone_flags, newsp, |
| 1673 | parent_tidptr, child_tidptr, tls_val); | ||
| 1674 | return ret; | ||
| 1673 | } | 1675 | } |
| 1674 | #endif | 1676 | #endif |
| 1675 | 1677 | ||
diff --git a/kernel/signal.c b/kernel/signal.c index 372771e948c2..53cd5c4d1172 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -3116,8 +3116,9 @@ int __save_altstack(stack_t __user *uss, unsigned long sp) | |||
| 3116 | 3116 | ||
| 3117 | #ifdef CONFIG_COMPAT | 3117 | #ifdef CONFIG_COMPAT |
| 3118 | #ifdef CONFIG_GENERIC_SIGALTSTACK | 3118 | #ifdef CONFIG_GENERIC_SIGALTSTACK |
| 3119 | asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr, | 3119 | COMPAT_SYSCALL_DEFINE2(sigaltstack, |
| 3120 | compat_stack_t __user *uoss_ptr) | 3120 | const compat_stack_t __user *, uss_ptr, |
| 3121 | compat_stack_t __user *, uoss_ptr) | ||
| 3121 | { | 3122 | { |
| 3122 | stack_t uss, uoss; | 3123 | stack_t uss, uoss; |
| 3123 | int ret; | 3124 | int ret; |
