From: Heiko Carstens Date: Wed, 1 Feb 2006 11:05:58 +0000 (-0800) Subject: [PATCH] powerpc: Fix sigmask handling in sys_sigsuspend. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4a41cdf9788f14bb120ad06d9ce17ca05fd72f03;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 3747ab0dac3f..c6d0595da6b5 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);