From: Matt Fleming Date: Fri, 19 Aug 2011 16:46:57 +0000 (+0100) Subject: coda: Use set_current_blocked() X-Git-Tag: next-20110829~17^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a9f45dd436d12f48ef30937091efa68818294020;p=karo-tx-linux.git coda: Use set_current_blocked() 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 Signed-off-by: Oleg Nesterov --- diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 9727e0c52579..ce5925d56ccc 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