Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760235Ab2BNLlh (ORCPT ); Tue, 14 Feb 2012 06:41:37 -0500 Received: from arkanian.console-pimps.org ([212.110.184.194]:57633 "EHLO arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760192Ab2BNLlf (ORCPT ); Tue, 14 Feb 2012 06:41:35 -0500 From: Matt Fleming To: linux-arch@vger.kernel.org Cc: Oleg Nesterov , Andrew Morton , linux-kernel@vger.kernel.org, Hans-Christian Egtvedt Subject: [PATCH 04/40] avr32: use set_current_blocked() in handle_signal/sys_rt_sigreturn Date: Tue, 14 Feb 2012 11:40:37 +0000 Message-Id: <1329219673-28711-5-git-send-email-matt@console-pimps.org> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1329219673-28711-1-git-send-email-matt@console-pimps.org> References: <1329219673-28711-1-git-send-email-matt@console-pimps.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2059 Lines: 63 From: Oleg Nesterov 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 Acked-by: Havard Skinnemoen Reviewed-by: Matt Fleming Signed-off-by: Oleg Nesterov --- arch/avr32/kernel/signal.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index 9c075e1..06f4293 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) 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; @@ -226,6 +223,7 @@ static inline void handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *oldset, struct pt_regs *regs, int syscall) { + sigset_t blocked; int ret; /* @@ -246,13 +244,10 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, /* * Block the signal if we were successful. */ - spin_lock_irq(¤t->sighand->siglock); - sigorsets(¤t->blocked, ¤t->blocked, - &ka->sa.sa_mask); + sigorsets(&blocked, ¤t->blocked, &ka->sa.sa_mask); if (!(ka->sa.sa_flags & SA_NODEFER)) - sigaddset(¤t->blocked, sig); - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + sigaddset(&blocked, sig); + set_current_blocked(&blocked); } /* -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/