From: Heiko Carstens Date: Wed, 1 Feb 2006 11:05:58 +0000 (-0800) Subject: [PATCH] powerpc: Fix sigmask handling in sys_sigsuspend. X-Git-Tag: v2.6.16-rc2~79 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a41cdf9788f14bb120ad06d9ce17ca05fd72f03;p=linux-2.6 [PATCH] powerpc: Fix sigmask handling in sys_sigsuspend. Better save the sigmask instead of throwing it away so it can be restored. Signed-off-by: Heiko Carstens Acked-by: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 3747ab0dac..c6d0595da6 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -254,11 +254,9 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs); */ long sys_sigsuspend(old_sigset_t mask) { - sigset_t saveset; - mask &= _BLOCKABLE; spin_lock_irq(¤t->sighand->siglock); - saveset = current->blocked; + current->saved_sigmask = current->blocked; siginitset(¤t->blocked, mask); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock);