aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/tile/kernel/signal.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c
index 7c2fecc52177..491669065ffb 100644
--- a/arch/tile/kernel/signal.c
+++ b/arch/tile/kernel/signal.c
@@ -45,8 +45,7 @@
45int restore_sigcontext(struct pt_regs *regs, 45int restore_sigcontext(struct pt_regs *regs,
46 struct sigcontext __user *sc) 46 struct sigcontext __user *sc)
47{ 47{
48 int err = 0; 48 int err;
49 int i;
50 49
51 /* Always make any pending restarted system calls return -EINTR */ 50 /* Always make any pending restarted system calls return -EINTR */
52 current_thread_info()->restart_block.fn = do_no_restart_syscall; 51 current_thread_info()->restart_block.fn = do_no_restart_syscall;
@@ -57,9 +56,7 @@ int restore_sigcontext(struct pt_regs *regs,
57 */ 56 */
58 BUILD_BUG_ON(sizeof(struct sigcontext) != sizeof(struct pt_regs)); 57 BUILD_BUG_ON(sizeof(struct sigcontext) != sizeof(struct pt_regs));
59 BUILD_BUG_ON(sizeof(struct sigcontext) % 8 != 0); 58 BUILD_BUG_ON(sizeof(struct sigcontext) % 8 != 0);
60 59 err = __copy_from_user(regs, sc, sizeof(*regs));
61 for (i = 0; i < sizeof(struct pt_regs)/sizeof(long); ++i)
62 err |= __get_user(regs->regs[i], &sc->gregs[i]);
63 60
64 /* Ensure that the PL is always set to USER_PL. */ 61 /* Ensure that the PL is always set to USER_PL. */
65 regs->ex1 = PL_ICS_EX1(USER_PL, EX1_ICS(regs->ex1)); 62 regs->ex1 = PL_ICS_EX1(USER_PL, EX1_ICS(regs->ex1));
@@ -110,12 +107,7 @@ badframe:
110 107
111int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) 108int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs)
112{ 109{
113 int i, err = 0; 110 return __copy_to_user(sc, regs, sizeof(*regs));
114
115 for (i = 0; i < sizeof(struct pt_regs)/sizeof(long); ++i)
116 err |= __put_user(regs->regs[i], &sc->gregs[i]);
117
118 return err;
119} 111}
120 112
121/* 113/*