From: Oleg Nesterov Date: Sat, 5 Jan 2013 18:13:13 +0000 (+0100) Subject: signals: sys_ssetmask() uses uninitialized newmask X-Git-Tag: v3.7.2~32 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5a88b8abb0a0f7b4611daaf5305c6cc08cdf5d2b;p=karo-tx-linux.git signals: sys_ssetmask() uses uninitialized newmask commit 5ba53ff648e785445a32ba39112ed07e4cf588d0 upstream. Commit 77097ae503b1 ("most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set") removed the initialization of newmask by accident, causing ltp to complain like this: ssetmask01 1 TFAIL : sgetmask() failed: TEST_ERRNO=???(0): Success Restore the proper initialization. Reported-and-tested-by: CAI Qian Signed-off-by: Oleg Nesterov Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/signal.c b/kernel/signal.c index 0af8868525d6..e4d40140a49c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3221,6 +3221,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask) int old = current->blocked.sig[0]; sigset_t newset; + siginitset(&newset, newmask); set_current_blocked(&newset); return old;