aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-05-10 20:57:58 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-21 23:52:36 -0400
commit49209590cb1cdd30b35edd65535184e39bfbab99 (patch)
treec23f46a276ed0b04abe85b6ab460c7133d4e3d21 /arch/avr32
parente1b1fd79a04396d5ec971e9e4d4711b5a58ad7e3 (diff)
avr32: use set_current_blocked() in handle_signal/sys_rt_sigreturn
It is wrong to change ->blocked directly, see e6fa16ab. Change handle_signal() and sys_rt_sigreturn() to use the right helper, set_current_blocked(). Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> Reviewed-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/kernel/signal.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index 9c075e105d60..06f4293f85d8 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -87,10 +87,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
87 goto badframe; 87 goto badframe;
88 88
89 sigdelsetmask(&set, ~_BLOCKABLE); 89 sigdelsetmask(&set, ~_BLOCKABLE);
90 spin_lock_irq(&current->sighand->siglock); 90 set_current_blocked(&set);
91 current->blocked = set;
92 recalc_sigpending();
93 spin_unlock_irq(&current->sighand->siglock);
94 91
95 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 92 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
96 goto badframe; 93 goto badframe;
@@ -226,6 +223,7 @@ static inline void
226handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, 223handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
227 sigset_t *oldset, struct pt_regs *regs, int syscall) 224 sigset_t *oldset, struct pt_regs *regs, int syscall)
228{ 225{
226 sigset_t blocked;
229 int ret; 227 int ret;
230 228
231 /* 229 /*
@@ -246,13 +244,10 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
246 /* 244 /*
247 * Block the signal if we were successful. 245 * Block the signal if we were successful.
248 */ 246 */
249 spin_lock_irq(&current->sighand->siglock); 247 sigorsets(&blocked, &current->blocked, &ka->sa.sa_mask);
250 sigorsets(&current->blocked, &current->blocked,
251 &ka->sa.sa_mask);
252 if (!(ka->sa.sa_flags & SA_NODEFER)) 248 if (!(ka->sa.sa_flags & SA_NODEFER))
253 sigaddset(&current->blocked, sig); 249 sigaddset(&blocked, sig);
254 recalc_sigpending(); 250 set_current_blocked(&blocked);
255 spin_unlock_irq(&current->sighand->siglock);
256} 251}
257 252
258/* 253/*