]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
coda: Use set_current_blocked()
authorMatt Fleming <matt.fleming@intel.com>
Fri, 19 Aug 2011 16:46:57 +0000 (17:46 +0100)
committerOleg Nesterov <oleg@redhat.com>
Fri, 26 Aug 2011 17:15:48 +0000 (19:15 +0200)
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 <oleg@redhat.com>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
fs/coda/upcall.c

index 9727e0c525793354cee16b4ccb3df71598ddd843..ce5925d56ccc405d7dc16d2fd74a1fc6c97df53e 100644 (file)
@@ -575,24 +575,21 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs)
  */
 static void coda_block_signals(sigset_t *old)
 {
-       spin_lock_irq(&current->sighand->siglock);
+       sigset_t blocked;
+
        *old = current->blocked;
 
-       sigfillset(&current->blocked);
-       sigdelset(&current->blocked, SIGKILL);
-       sigdelset(&current->blocked, SIGSTOP);
-       sigdelset(&current->blocked, SIGINT);
+       sigfillset(&blocked);
+       sigdelset(&blocked, SIGKILL);
+       sigdelset(&blocked, SIGSTOP);
+       sigdelset(&blocked, SIGINT);
 
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
+       set_current_blocked(&blocked);
 }
 
 static void coda_unblock_signals(sigset_t *old)
 {
-       spin_lock_irq(&current->sighand->siglock);
-       current->blocked = *old;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
+       set_current_blocked(old);
 }
 
 /* Don't allow signals to interrupt the following upcalls before venus