diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-26 23:25:06 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-21 14:20:27 -0400 |
commit | 5a30a798fb501429522a30b6027a603244d659b2 (patch) | |
tree | 17a0e45af5c3b32f0a7005a094ad613b20ec6d61 /arch/um | |
parent | d50349b0c397407458ea8c57aee765d158e6f9ee (diff) |
um: wrong sigmask saved in case of multiple sigframes
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>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/signal.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index 0dfcef92ec91..187118fbe1bc 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c | |||
@@ -74,15 +74,14 @@ static int kern_do_signal(struct pt_regs *regs) | |||
74 | { | 74 | { |
75 | struct k_sigaction ka_copy; | 75 | struct k_sigaction ka_copy; |
76 | siginfo_t info; | 76 | siginfo_t info; |
77 | sigset_t *oldset; | ||
78 | int sig, handled_sig = 0; | 77 | int sig, handled_sig = 0; |
79 | 78 | ||
80 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
81 | oldset = ¤t->saved_sigmask; | ||
82 | else | ||
83 | oldset = ¤t->blocked; | ||
84 | |||
85 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { | 79 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { |
80 | sigset_t *oldset; | ||
81 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
82 | oldset = ¤t->saved_sigmask; | ||
83 | else | ||
84 | oldset = ¤t->blocked; | ||
86 | handled_sig = 1; | 85 | handled_sig = 1; |
87 | /* Whee! Actually deliver the signal. */ | 86 | /* Whee! Actually deliver the signal. */ |
88 | if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) { | 87 | if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) { |