diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-02-12 19:05:11 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-02-13 17:40:51 -0500 |
commit | 431dc8040354db65e4f8d4d4e21ae4fab41f5bc3 (patch) | |
tree | 54381eb2e9b738fd3d87fd129da85086983296c5 /arch/mips/kernel/signal_n32.c | |
parent | 366d6aef281a670b32a51d289fc07bf0e5e72d9a (diff) |
[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/signal_n32.c')
-rw-r--r-- | arch/mips/kernel/signal_n32.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 1a5f248faf3b..7ca2a078841f 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <asm/asm.h> | 32 | #include <asm/asm.h> |
33 | #include <asm/cacheflush.h> | 33 | #include <asm/cacheflush.h> |
34 | #include <asm/compat-signal.h> | ||
34 | #include <asm/sim.h> | 35 | #include <asm/sim.h> |
35 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
36 | #include <asm/ucontext.h> | 37 | #include <asm/ucontext.h> |
@@ -63,7 +64,7 @@ struct ucontextn32 { | |||
63 | s32 uc_link; | 64 | s32 uc_link; |
64 | stack32_t uc_stack; | 65 | stack32_t uc_stack; |
65 | struct sigcontext uc_mcontext; | 66 | struct sigcontext uc_mcontext; |
66 | sigset_t uc_sigmask; /* mask last for extensibility */ | 67 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
67 | }; | 68 | }; |
68 | 69 | ||
69 | #if ICACHE_REFILLS_WORKAROUND_WAR == 0 | 70 | #if ICACHE_REFILLS_WORKAROUND_WAR == 0 |
@@ -129,7 +130,7 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | |||
129 | frame = (struct rt_sigframe_n32 __user *) regs.regs[29]; | 130 | frame = (struct rt_sigframe_n32 __user *) regs.regs[29]; |
130 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 131 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
131 | goto badframe; | 132 | goto badframe; |
132 | if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set))) | 133 | if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask)) |
133 | goto badframe; | 134 | goto badframe; |
134 | 135 | ||
135 | sigdelsetmask(&set, ~_BLOCKABLE); | 136 | sigdelsetmask(&set, ~_BLOCKABLE); |
@@ -195,7 +196,7 @@ int setup_rt_frame_n32(struct k_sigaction * ka, | |||
195 | err |= __put_user(current->sas_ss_size, | 196 | err |= __put_user(current->sas_ss_size, |
196 | &frame->rs_uc.uc_stack.ss_size); | 197 | &frame->rs_uc.uc_stack.ss_size); |
197 | err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); | 198 | err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); |
198 | err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set)); | 199 | err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); |
199 | 200 | ||
200 | if (err) | 201 | if (err) |
201 | goto give_sigsegv; | 202 | goto give_sigsegv; |