From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756533Ab1HSQtT (ORCPT ); Fri, 19 Aug 2011 12:49:19 -0400 Received: from arkanian.console-pimps.org ([212.110.184.194]:57406 "EHLO arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932126Ab1HSQsj (ORCPT ); Fri, 19 Aug 2011 12:48:39 -0400 From: Matt Fleming To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, Jan Harkes Subject: [PATCH v2 41/43] coda: Use set_current_blocked() Date: Fri, 19 Aug 2011 17:46:57 +0100 Message-Id: <1313772419-21951-42-git-send-email-matt@console-pimps.org> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1313772419-21951-1-git-send-email-matt@console-pimps.org> References: <1313772419-21951-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 From: Matt Fleming 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. Acked-by: Oleg Nesterov Cc: Jan Harkes Signed-off-by: Matt Fleming --- fs/coda/upcall.c | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 9727e0c..ce5925d 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -575,24 +575,21 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs) */ static void coda_block_signals(sigset_t *old) { - spin_lock_irq(¤t->sighand->siglock); + sigset_t blocked; + *old = current->blocked; - sigfillset(¤t->blocked); - sigdelset(¤t->blocked, SIGKILL); - sigdelset(¤t->blocked, SIGSTOP); - sigdelset(¤t->blocked, SIGINT); + sigfillset(&blocked); + sigdelset(&blocked, SIGKILL); + sigdelset(&blocked, SIGSTOP); + sigdelset(&blocked, SIGINT); - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + set_current_blocked(&blocked); } static void coda_unblock_signals(sigset_t *old) { - spin_lock_irq(¤t->sighand->siglock); - current->blocked = *old; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + set_current_blocked(old); } /* Don't allow signals to interrupt the following upcalls before venus -- 1.7.4.4