diff options
Diffstat (limited to 'arch/tile/kernel/compat_signal.c')
-rw-r--r-- | arch/tile/kernel/compat_signal.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c index 9fa4ba8ed5f4..d5efb215dd5f 100644 --- a/arch/tile/kernel/compat_signal.c +++ b/arch/tile/kernel/compat_signal.c | |||
@@ -32,13 +32,14 @@ | |||
32 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
33 | #include <asm/ucontext.h> | 33 | #include <asm/ucontext.h> |
34 | #include <asm/sigframe.h> | 34 | #include <asm/sigframe.h> |
35 | #include <asm/syscalls.h> | ||
35 | #include <arch/interrupts.h> | 36 | #include <arch/interrupts.h> |
36 | 37 | ||
37 | struct compat_sigaction { | 38 | struct compat_sigaction { |
38 | compat_uptr_t sa_handler; | 39 | compat_uptr_t sa_handler; |
39 | compat_ulong_t sa_flags; | 40 | compat_ulong_t sa_flags; |
40 | compat_uptr_t sa_restorer; | 41 | compat_uptr_t sa_restorer; |
41 | sigset_t sa_mask; /* mask last for extensibility */ | 42 | sigset_t sa_mask __packed; |
42 | }; | 43 | }; |
43 | 44 | ||
44 | struct compat_sigaltstack { | 45 | struct compat_sigaltstack { |
@@ -170,7 +171,7 @@ long compat_sys_rt_sigqueueinfo(int pid, int sig, | |||
170 | if (copy_siginfo_from_user32(&info, uinfo)) | 171 | if (copy_siginfo_from_user32(&info, uinfo)) |
171 | return -EFAULT; | 172 | return -EFAULT; |
172 | set_fs(KERNEL_DS); | 173 | set_fs(KERNEL_DS); |
173 | ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *)&info); | 174 | ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force __user *)&info); |
174 | set_fs(old_fs); | 175 | set_fs(old_fs); |
175 | return ret; | 176 | return ret; |
176 | } | 177 | } |
@@ -274,7 +275,8 @@ long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | |||
274 | } | 275 | } |
275 | seg = get_fs(); | 276 | seg = get_fs(); |
276 | set_fs(KERNEL_DS); | 277 | set_fs(KERNEL_DS); |
277 | ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, | 278 | ret = do_sigaltstack(uss_ptr ? (stack_t __user __force *)&uss : NULL, |
279 | (stack_t __user __force *)&uoss, | ||
278 | (unsigned long)compat_ptr(regs->sp)); | 280 | (unsigned long)compat_ptr(regs->sp)); |
279 | set_fs(seg); | 281 | set_fs(seg); |
280 | if (ret >= 0 && uoss_ptr) { | 282 | if (ret >= 0 && uoss_ptr) { |
@@ -336,7 +338,7 @@ static inline void __user *compat_get_sigframe(struct k_sigaction *ka, | |||
336 | * will die with SIGSEGV. | 338 | * will die with SIGSEGV. |
337 | */ | 339 | */ |
338 | if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size))) | 340 | if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size))) |
339 | return (void __user *) -1L; | 341 | return (void __user __force *)-1UL; |
340 | 342 | ||
341 | /* This is the X/Open sanctioned signal stack switching. */ | 343 | /* This is the X/Open sanctioned signal stack switching. */ |
342 | if (ka->sa.sa_flags & SA_ONSTACK) { | 344 | if (ka->sa.sa_flags & SA_ONSTACK) { |