Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932394Ab2BNLpx (ORCPT ); Tue, 14 Feb 2012 06:45:53 -0500 Received: from arkanian.console-pimps.org ([212.110.184.194]:57860 "EHLO arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932329Ab2BNLoA (ORCPT ); Tue, 14 Feb 2012 06:44:00 -0500 From: Matt Fleming To: linux-arch@vger.kernel.org Cc: Oleg Nesterov , Andrew Morton , linux-kernel@vger.kernel.org, Matt Fleming , user-mode-linux-devel@lists.sourceforge.net Subject: [PATCH 34/40] um: Don't restore current->blocked on error Date: Tue, 14 Feb 2012 11:41:07 +0000 Message-Id: <1329219673-28711-35-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: 1443 Lines: 43 From: Matt Fleming If we fail to setup the signal stack frame then we don't need to restore current->blocked because it is not modified by setup_signal_stack_*. Acked-by: Oleg Nesterov Acked-by: Richard Weinberger Tested-by: Richard Weinberger Cc: user-mode-linux-devel@lists.sourceforge.net Signed-off-by: Matt Fleming --- arch/um/kernel/signal.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index e8b889d..8382e0b 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c @@ -65,13 +65,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr, #endif err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset); - if (err) { - spin_lock_irq(¤t->sighand->siglock); - current->blocked = *oldset; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + if (err) force_sigsegv(signr, current); - } else { + else { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); -- 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/