diff options
Diffstat (limited to 'arch/mn10300/kernel/signal.c')
-rw-r--r-- | arch/mn10300/kernel/signal.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index d4de05ab7864..690f4e9507d7 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -91,7 +91,7 @@ asmlinkage long sys_sigaction(int sig, | |||
91 | */ | 91 | */ |
92 | asmlinkage long sys_sigaltstack(const stack_t __user *uss, stack_t *uoss) | 92 | asmlinkage long sys_sigaltstack(const stack_t __user *uss, stack_t *uoss) |
93 | { | 93 | { |
94 | return do_sigaltstack(uss, uoss, __frame->sp); | 94 | return do_sigaltstack(uss, uoss, current_frame()->sp); |
95 | } | 95 | } |
96 | 96 | ||
97 | /* | 97 | /* |
@@ -156,10 +156,11 @@ badframe: | |||
156 | */ | 156 | */ |
157 | asmlinkage long sys_sigreturn(void) | 157 | asmlinkage long sys_sigreturn(void) |
158 | { | 158 | { |
159 | struct sigframe __user *frame = (struct sigframe __user *) __frame->sp; | 159 | struct sigframe __user *frame; |
160 | sigset_t set; | 160 | sigset_t set; |
161 | long d0; | 161 | long d0; |
162 | 162 | ||
163 | frame = (struct sigframe __user *) current_frame()->sp; | ||
163 | if (verify_area(VERIFY_READ, frame, sizeof(*frame))) | 164 | if (verify_area(VERIFY_READ, frame, sizeof(*frame))) |
164 | goto badframe; | 165 | goto badframe; |
165 | if (__get_user(set.sig[0], &frame->sc.oldmask)) | 166 | if (__get_user(set.sig[0], &frame->sc.oldmask)) |
@@ -176,7 +177,7 @@ asmlinkage long sys_sigreturn(void) | |||
176 | recalc_sigpending(); | 177 | recalc_sigpending(); |
177 | spin_unlock_irq(¤t->sighand->siglock); | 178 | spin_unlock_irq(¤t->sighand->siglock); |
178 | 179 | ||
179 | if (restore_sigcontext(__frame, &frame->sc, &d0)) | 180 | if (restore_sigcontext(current_frame(), &frame->sc, &d0)) |
180 | goto badframe; | 181 | goto badframe; |
181 | 182 | ||
182 | return d0; | 183 | return d0; |
@@ -191,11 +192,11 @@ badframe: | |||
191 | */ | 192 | */ |
192 | asmlinkage long sys_rt_sigreturn(void) | 193 | asmlinkage long sys_rt_sigreturn(void) |
193 | { | 194 | { |
194 | struct rt_sigframe __user *frame = | 195 | struct rt_sigframe __user *frame; |
195 | (struct rt_sigframe __user *) __frame->sp; | ||
196 | sigset_t set; | 196 | sigset_t set; |
197 | unsigned long d0; | 197 | long d0; |
198 | 198 | ||
199 | frame = (struct rt_sigframe __user *) current_frame()->sp; | ||
199 | if (verify_area(VERIFY_READ, frame, sizeof(*frame))) | 200 | if (verify_area(VERIFY_READ, frame, sizeof(*frame))) |
200 | goto badframe; | 201 | goto badframe; |
201 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 202 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
@@ -207,10 +208,11 @@ asmlinkage long sys_rt_sigreturn(void) | |||
207 | recalc_sigpending(); | 208 | recalc_sigpending(); |
208 | spin_unlock_irq(¤t->sighand->siglock); | 209 | spin_unlock_irq(¤t->sighand->siglock); |
209 | 210 | ||
210 | if (restore_sigcontext(__frame, &frame->uc.uc_mcontext, &d0)) | 211 | if (restore_sigcontext(current_frame(), &frame->uc.uc_mcontext, &d0)) |
211 | goto badframe; | 212 | goto badframe; |
212 | 213 | ||
213 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, __frame->sp) == -EFAULT) | 214 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, current_frame()->sp) == |
215 | -EFAULT) | ||
214 | goto badframe; | 216 | goto badframe; |
215 | 217 | ||
216 | return d0; | 218 | return d0; |
@@ -572,7 +574,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags) | |||
572 | 574 | ||
573 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 575 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
574 | clear_thread_flag(TIF_NOTIFY_RESUME); | 576 | clear_thread_flag(TIF_NOTIFY_RESUME); |
575 | tracehook_notify_resume(__frame); | 577 | tracehook_notify_resume(current_frame()); |
576 | if (current->replacement_session_keyring) | 578 | if (current->replacement_session_keyring) |
577 | key_replace_session_keyring(); | 579 | key_replace_session_keyring(); |
578 | } | 580 | } |