diff options
Diffstat (limited to 'arch/tile/kernel/signal.c')
-rw-r--r-- | arch/tile/kernel/signal.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c index 687719d4abd1..1260321155f1 100644 --- a/arch/tile/kernel/signal.c +++ b/arch/tile/kernel/signal.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/smp_lock.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/signal.h> | 20 | #include <linux/signal.h> |
22 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
@@ -53,7 +52,7 @@ SYSCALL_DEFINE3(sigaltstack, const stack_t __user *, uss, | |||
53 | */ | 52 | */ |
54 | 53 | ||
55 | int restore_sigcontext(struct pt_regs *regs, | 54 | int restore_sigcontext(struct pt_regs *regs, |
56 | struct sigcontext __user *sc, long *pr0) | 55 | struct sigcontext __user *sc) |
57 | { | 56 | { |
58 | int err = 0; | 57 | int err = 0; |
59 | int i; | 58 | int i; |
@@ -76,17 +75,15 @@ int restore_sigcontext(struct pt_regs *regs, | |||
76 | 75 | ||
77 | regs->faultnum = INT_SWINT_1_SIGRETURN; | 76 | regs->faultnum = INT_SWINT_1_SIGRETURN; |
78 | 77 | ||
79 | err |= __get_user(*pr0, &sc->gregs[0]); | ||
80 | return err; | 78 | return err; |
81 | } | 79 | } |
82 | 80 | ||
83 | /* sigreturn() returns long since it restores r0 in the interrupted code. */ | 81 | /* The assembly shim for this function arranges to ignore the return value. */ |
84 | SYSCALL_DEFINE1(rt_sigreturn, struct pt_regs *, regs) | 82 | SYSCALL_DEFINE1(rt_sigreturn, struct pt_regs *, regs) |
85 | { | 83 | { |
86 | struct rt_sigframe __user *frame = | 84 | struct rt_sigframe __user *frame = |
87 | (struct rt_sigframe __user *)(regs->sp); | 85 | (struct rt_sigframe __user *)(regs->sp); |
88 | sigset_t set; | 86 | sigset_t set; |
89 | long r0; | ||
90 | 87 | ||
91 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 88 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
92 | goto badframe; | 89 | goto badframe; |
@@ -99,13 +96,13 @@ SYSCALL_DEFINE1(rt_sigreturn, struct pt_regs *, regs) | |||
99 | recalc_sigpending(); | 96 | recalc_sigpending(); |
100 | spin_unlock_irq(¤t->sighand->siglock); | 97 | spin_unlock_irq(¤t->sighand->siglock); |
101 | 98 | ||
102 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) | 99 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) |
103 | goto badframe; | 100 | goto badframe; |
104 | 101 | ||
105 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT) | 102 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT) |
106 | goto badframe; | 103 | goto badframe; |
107 | 104 | ||
108 | return r0; | 105 | return 0; |
109 | 106 | ||
110 | badframe: | 107 | badframe: |
111 | force_sig(SIGSEGV, current); | 108 | force_sig(SIGSEGV, current); |