summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal_n32.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-02-13 00:05:11 +0000
committerRalf Baechle <ralf@linux-mips.org>2007-02-13 22:40:51 +0000
commit431dc8040354db65e4f8d4d4e21ae4fab41f5bc3 (patch)
tree54381eb2e9b738fd3d87fd129da85086983296c5 /arch/mips/kernel/signal_n32.c
parent366d6aef281a670b32a51d289fc07bf0e5e72d9a (diff)
downloadblackbird-op-linux-431dc8040354db65e4f8d4d4e21ae4fab41f5bc3.tar.gz
blackbird-op-linux-431dc8040354db65e4f8d4d4e21ae4fab41f5bc3.zip
[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.c7
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 @@
#include <asm/asm.h>
#include <asm/cacheflush.h>
+#include <asm/compat-signal.h>
#include <asm/sim.h>
#include <asm/uaccess.h>
#include <asm/ucontext.h>
@@ -63,7 +64,7 @@ struct ucontextn32 {
s32 uc_link;
stack32_t uc_stack;
struct sigcontext uc_mcontext;
- sigset_t uc_sigmask; /* mask last for extensibility */
+ compat_sigset_t uc_sigmask; /* mask last for extensibility */
};
#if ICACHE_REFILLS_WORKAROUND_WAR == 0
@@ -129,7 +130,7 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
frame = (struct rt_sigframe_n32 __user *) regs.regs[29];
if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
goto badframe;
- if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
+ if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask))
goto badframe;
sigdelsetmask(&set, ~_BLOCKABLE);
@@ -195,7 +196,7 @@ int setup_rt_frame_n32(struct k_sigaction * ka,
err |= __put_user(current->sas_ss_size,
&frame->rs_uc.uc_stack.ss_size);
err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
- err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
+ err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
if (err)
goto give_sigsegv;
OpenPOWER on IntegriCloud