diff options
Diffstat (limited to 'arch/powerpc/kernel/signal_32.c')
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 45eb998557f8..8b4c049aee20 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -204,10 +204,10 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
204 | 204 | ||
205 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 205 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
206 | __get_user(new_ka->sa.sa_handler, &act->sa_handler) || | 206 | __get_user(new_ka->sa.sa_handler, &act->sa_handler) || |
207 | __get_user(new_ka->sa.sa_restorer, &act->sa_restorer)) | 207 | __get_user(new_ka->sa.sa_restorer, &act->sa_restorer) || |
208 | __get_user(new_ka->sa.sa_flags, &act->sa_flags) || | ||
209 | __get_user(mask, &act->sa_mask)) | ||
208 | return -EFAULT; | 210 | return -EFAULT; |
209 | __get_user(new_ka->sa.sa_flags, &act->sa_flags); | ||
210 | __get_user(mask, &act->sa_mask); | ||
211 | siginitset(&new_ka->sa.sa_mask, mask); | 211 | siginitset(&new_ka->sa.sa_mask, mask); |
212 | return 0; | 212 | return 0; |
213 | } | 213 | } |
@@ -244,17 +244,8 @@ static inline int restore_general_regs(struct pt_regs *regs, | |||
244 | long sys_sigsuspend(old_sigset_t mask) | 244 | long sys_sigsuspend(old_sigset_t mask) |
245 | { | 245 | { |
246 | sigset_t blocked; | 246 | sigset_t blocked; |
247 | |||
248 | current->saved_sigmask = current->blocked; | ||
249 | |||
250 | mask &= _BLOCKABLE; | ||
251 | siginitset(&blocked, mask); | 247 | siginitset(&blocked, mask); |
252 | set_current_blocked(&blocked); | 248 | return sigsuspend(&blocked); |
253 | |||
254 | current->state = TASK_INTERRUPTIBLE; | ||
255 | schedule(); | ||
256 | set_restore_sigmask(); | ||
257 | return -ERESTARTNOHAND; | ||
258 | } | 249 | } |
259 | 250 | ||
260 | long sys_sigaction(int sig, struct old_sigaction __user *act, | 251 | long sys_sigaction(int sig, struct old_sigaction __user *act, |
@@ -928,7 +919,7 @@ static int do_setcontext(struct ucontext __user *ucp, struct pt_regs *regs, int | |||
928 | if (!access_ok(VERIFY_READ, mcp, sizeof(*mcp))) | 919 | if (!access_ok(VERIFY_READ, mcp, sizeof(*mcp))) |
929 | return -EFAULT; | 920 | return -EFAULT; |
930 | #endif | 921 | #endif |
931 | restore_sigmask(&set); | 922 | set_current_blocked(&set); |
932 | if (restore_user_regs(regs, mcp, sig)) | 923 | if (restore_user_regs(regs, mcp, sig)) |
933 | return -EFAULT; | 924 | return -EFAULT; |
934 | 925 | ||
@@ -1282,7 +1273,7 @@ long sys_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8, | |||
1282 | set.sig[0] = sigctx.oldmask; | 1273 | set.sig[0] = sigctx.oldmask; |
1283 | set.sig[1] = sigctx._unused[3]; | 1274 | set.sig[1] = sigctx._unused[3]; |
1284 | #endif | 1275 | #endif |
1285 | restore_sigmask(&set); | 1276 | set_current_blocked(&set); |
1286 | 1277 | ||
1287 | sr = (struct mcontext __user *)from_user_ptr(sigctx.regs); | 1278 | sr = (struct mcontext __user *)from_user_ptr(sigctx.regs); |
1288 | addr = sr; | 1279 | addr = sr; |