提交 5ba53ff6 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

signals: sys_ssetmask() uses uninitialized newmask

Commit 77097ae5 ("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: NCAI Qian <caiqian@redhat.com>
Signed-off-by: NOleg Nesterov <oleg@redhat.com>
Cc: stable@kernel.org	# v3.5+
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5f243b9b
...@@ -3286,6 +3286,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask) ...@@ -3286,6 +3286,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask)
int old = current->blocked.sig[0]; int old = current->blocked.sig[0];
sigset_t newset; sigset_t newset;
siginitset(&newset, newmask);
set_current_blocked(&newset); set_current_blocked(&newset);
return old; return old;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册