Skip to content

Commit

Permalink
signals: sys_ssetmask() uses uninitialized newmask
Browse files Browse the repository at this point in the history
Commit 77097ae ("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 <caiqian@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: stable@kernel.org	# v3.5+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jan 6, 2013
1 parent 5f243b9 commit 5ba53ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3286,6 +3286,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask)
int old = current->blocked.sig[0];
sigset_t newset;

siginitset(&newset, newmask);
set_current_blocked(&newset);

return old;
Expand Down

0 comments on commit 5ba53ff

Please sign in to comment.