diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-02-14 12:41:06 +0100 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-03-13 21:42:05 +0100 |
commit | ad092338350e517608a41341095b6b1e312c4eb1 (patch) | |
tree | 1f2d5273f4e7fc3648f571355bfb7f1f79d796b7 /arch/tile/kernel/compat_signal.c | |
parent | arch/tile: misplaced parens near likely (diff) | |
download | linux-ad092338350e517608a41341095b6b1e312c4eb1.tar.xz linux-ad092338350e517608a41341095b6b1e312c4eb1.zip |
tile: Use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block
is pending in the shared queue.
Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate
code across architectures. In the past some architectures got this
code wrong, so using this helper function should stop that from
happening again.
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/kernel/compat_signal.c')
-rw-r--r-- | arch/tile/kernel/compat_signal.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c index a7869ad62776..77763ccd5a7d 100644 --- a/arch/tile/kernel/compat_signal.c +++ b/arch/tile/kernel/compat_signal.c @@ -303,10 +303,7 @@ long compat_sys_rt_sigreturn(struct pt_regs *regs) goto badframe; sigdelsetmask(&set, ~_BLOCKABLE); - spin_lock_irq(¤t->sighand->siglock); - current->blocked = set; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + set_current_blocked(&set); if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) goto badframe; |