Skip to content

Commit

Permalink
um: wrong sigmask saved in case of multiple sigframes
Browse files Browse the repository at this point in the history
we can't just find oldmask once; if there are multiple signals
and we loop building sigframes for those, ->saved_mask will be
definitely wrong for all but the first one.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 21, 2012
1 parent d50349b commit 5a30a79
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions arch/um/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,14 @@ static int kern_do_signal(struct pt_regs *regs)
{
struct k_sigaction ka_copy;
siginfo_t info;
sigset_t *oldset;
int sig, handled_sig = 0;

if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = &current->saved_sigmask;
else
oldset = &current->blocked;

while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
sigset_t *oldset;
if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = &current->saved_sigmask;
else
oldset = &current->blocked;
handled_sig = 1;
/* Whee! Actually deliver the signal. */
if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) {
Expand Down

0 comments on commit 5a30a79

Please sign in to comment.