diff options
Diffstat (limited to 'arch/tile/kernel/compat_signal.c')
-rw-r--r-- | arch/tile/kernel/compat_signal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c index 08b4fe1717bb..2e4cc69224a6 100644 --- a/arch/tile/kernel/compat_signal.c +++ b/arch/tile/kernel/compat_signal.c | |||
@@ -197,8 +197,7 @@ int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from) | |||
197 | } | 197 | } |
198 | 198 | ||
199 | long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | 199 | long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, |
200 | struct compat_sigaltstack __user *uoss_ptr, | 200 | struct compat_sigaltstack __user *uoss_ptr) |
201 | struct pt_regs *regs) | ||
202 | { | 201 | { |
203 | stack_t uss, uoss; | 202 | stack_t uss, uoss; |
204 | int ret; | 203 | int ret; |
@@ -219,7 +218,7 @@ long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | |||
219 | set_fs(KERNEL_DS); | 218 | set_fs(KERNEL_DS); |
220 | ret = do_sigaltstack(uss_ptr ? (stack_t __user __force *)&uss : NULL, | 219 | ret = do_sigaltstack(uss_ptr ? (stack_t __user __force *)&uss : NULL, |
221 | (stack_t __user __force *)&uoss, | 220 | (stack_t __user __force *)&uoss, |
222 | (unsigned long)compat_ptr(regs->sp)); | 221 | (unsigned long)compat_ptr(current_pt_regs()->sp)); |
223 | set_fs(seg); | 222 | set_fs(seg); |
224 | if (ret >= 0 && uoss_ptr) { | 223 | if (ret >= 0 && uoss_ptr) { |
225 | if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(*uoss_ptr)) || | 224 | if (!access_ok(VERIFY_WRITE, uoss_ptr, sizeof(*uoss_ptr)) || |
@@ -232,8 +231,9 @@ long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | |||
232 | } | 231 | } |
233 | 232 | ||
234 | /* The assembly shim for this function arranges to ignore the return value. */ | 233 | /* The assembly shim for this function arranges to ignore the return value. */ |
235 | long compat_sys_rt_sigreturn(struct pt_regs *regs) | 234 | long compat_sys_rt_sigreturn(void) |
236 | { | 235 | { |
236 | struct pt_regs *regs = current_pt_regs(); | ||
237 | struct compat_rt_sigframe __user *frame = | 237 | struct compat_rt_sigframe __user *frame = |
238 | (struct compat_rt_sigframe __user *) compat_ptr(regs->sp); | 238 | (struct compat_rt_sigframe __user *) compat_ptr(regs->sp); |
239 | sigset_t set; | 239 | sigset_t set; |
@@ -248,7 +248,7 @@ long compat_sys_rt_sigreturn(struct pt_regs *regs) | |||
248 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) | 248 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) |
249 | goto badframe; | 249 | goto badframe; |
250 | 250 | ||
251 | if (compat_sys_sigaltstack(&frame->uc.uc_stack, NULL, regs) != 0) | 251 | if (compat_sys_sigaltstack(&frame->uc.uc_stack, NULL) == -EFAULT) |
252 | goto badframe; | 252 | goto badframe; |
253 | 253 | ||
254 | return 0; | 254 | return 0; |