Skip to contentSkip to conversation

powerpc: Fix sigmask handling in sys_sigsuspend.

PATCH New Heiko Carstens 1 participant 1 message Jan 23, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix sigmask handling in sys_sigsuspend.

From: Heiko Carstens <[email protected]>

Better save the sigmask instead of throwing it away so it can be restored.

---

Completely untested. Just noticed this when adding TIF_RESTORE_SIGMASK support for s390.

 arch/powerpc/kernel/signal_32.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/kernel/signal_32.c +1 -3
index 3747ab0..c6d0595 100644
@@ -254,11 +254,9 @@ int do_signal(sigset_t *oldset, struct p
  */
 long sys_sigsuspend(old_sigset_t mask)
 {
-	sigset_t saveset;
-
 	mask &= _BLOCKABLE;
 	spin_lock_irq(&current->sighand->siglock);
-	saveset = current->blocked;
+	current->saved_sigmask = current->blocked;
 	siginitset(&current->blocked, mask);
 	recalc_sigpending();
 	spin_unlock_irq(&current->sighand->siglock);